Issue metadata
Sign in to add a comment
|
text input as foreign object within an svg - when input overflows the text appears esle where on the page
Reported by
matt3...@googlemail.com,
Feb 20 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 Steps to reproduce the problem: 1. text input box within foreignObject tag positioned inside an svg 2. type in the input box until it overflows 3. What is the expected behavior? text input box should behave as any other input box when the text overflows What went wrong? when the input box overflows the text appears elsewhere on the page. The attached image should help explain this issue... Did this work before? N/A Does this work in other browsers? Yes Chrome version: 47.0.2526.111 Channel: n/a OS Version: OS X 10.11.3 Flash Version: Shockwave Flash 22.0 r0
,
Feb 20 2017
Can you share a JSFiddle (or similar) test case that reproduces the problem with the least amount of code necessary? Thank you! (Also, make sure you use the latest Chrome version - Chrome 47 is very old and will never get a fix)
,
Feb 21 2017
,
Feb 21 2017
Reporter@ could you please provide the sample URL/JSFiddle test case which would help us to triage the issue further. Thanks..
,
Feb 21 2017
sorry, here's a link to the jsfiddle: https://jsfiddle.net/mpwaw/xcx2e56L/ (chrome fully updated now!) thanks
,
Feb 22 2017
I cannot reproduce using BrowserStack Chrome 56 on macOS Sierra. See the attached screenshot.
,
Feb 22 2017
@matt347 - you can try exposing the user agent shadow DOM in the Developer Tools settings and see what happens there in terms of the internal elements that the <input> employs...
,
Feb 22 2017
I believe what happens here is that when the input overflows, it gets a layer (probably for scrolling or similar), and then things break. Duping.
,
Aug 8 2017
I am hitting the same issue. I really needed the foreignObject feature to include inputs in a diagram to allow users to edit values in place, but this overflow issue is a blocker. I could not yet find a work around for it. It works well on Edge, Firefox and Safari.
,
Dec 6 2017
this bug also exists on windows.
,
Apr 3 2018
There's a minimal code to reproduce this bug. It only occurs in Chrome. My Chrome version is 65. I use LinuxMint, but my colleages on Mac have this problem too. There's only one <svg/> + <foreignObject/> + <input/> in the html file. If you'll open it in Chrome you'll see this input with its value as "1111". If you will write any another symbol to this input, then its font-size will be changed to very small. If you will push backspace (and return the value to "1111") the font-size will be recovered to its initial value. So, if the text in the input is fit to input boundaries - okay, if the text is bigger - bug happens. I tried to make minimal code to reproduce and have got this html. May be it's a bit strange, but I can't change any number or attribute in it without destroying the bug.
,
Apr 3 2018
This issue is closed. Star/track issue 771852 instead. No need for more reproduction cases, I believe, because it is a known issue.
,
Apr 3 2018
I'm experimenting with it. I've found out some interesting facts: 1. `position: relative` and `transform: translate(0, 0)` on `<input/>` enforce the input gets its html-size igroring SVG coordinates model. In this file it means the input shrinks to half of its initial size. 2. After "1." the font-size bug doesn't work. No matter how long the input's value - font-size is constant. 3. When the value of the input isn't fit to its boundaries not only the font-size detracts, the real inner boundaries detracts too. But its border has a correct size and a position.
,
Apr 3 2018
phistuck@gmail.com, ok, sorry :) |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by matt3...@googlemail.com
, Feb 20 2017141 KB
141 KB View Download