New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 694286 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 483497
Owner: ----
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



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 description

UserAgent: 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

 
Screen Shot 2017-02-20 at 15.59.43.jpg
141 KB View Download

Comment 2 by phistuck@gmail.com, 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)
Labels: Needs-Milestone
Cc: sureshkumari@chromium.org
Labels: Needs-Feedback
Reporter@ could you please provide the sample URL/JSFiddle test case which would help us to triage the issue further.

Thanks..

sorry,
here's a link to the jsfiddle:

https://jsfiddle.net/mpwaw/xcx2e56L/

(chrome fully updated now!)

thanks

Comment 6 by phistuck@gmail.com, Feb 22 2017

I cannot reproduce using BrowserStack Chrome 56 on macOS Sierra. See the attached screenshot.
svg-foreign-content-input-no-leak.png
597 KB View Download
Components: -Blink>Input Blink>SVG Blink>Forms>Text Blink>Layout
@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...

Comment 8 by f...@opera.com, Feb 22 2017

Mergedinto: 483497
Status: Duplicate (was: Unconfirmed)
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.
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.
this bug also exists on windows.

Comment 11 by fai...@gmail.com, 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. 
1.html
362 bytes View Download
This issue is closed. Star/track  issue 771852  instead. No need for more reproduction cases, I believe, because it is a known issue.

Comment 13 by fai...@gmail.com, 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.

Comment 14 by fai...@gmail.com, Apr 3 2018

phistuck@gmail.com, ok, sorry :)

Sign in to add a comment