text is clipped or missing in textfield input, after dynamic reflow with multi-column
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
People
(Reporter: lucas.werkmeister, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files, 1 obsolete file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Steps to reproduce:
- Open the attached index.html.
- Drag the link at the beginning into the first input (move mouse to link, press mouse button, move mouse to input, release mouse button).
- Move focus to second input (with tab or by clicking into it).
- Start typing.
Actual results:
The cursor is invisible, and, after typing, no text is visible (though the placeholder disappears).
Expected results:
The cursor and text input should be visible.
This was originally reported to me at https://github.com/lucaswerkmeister/tool-lexeme-forms/issues/74 as a bug in a website of mine (reproduced there with Firefox 88.0 on Windows and Firefox 90.0 on Windows); I subsequently reduced the HTML to the attached example (also hosted at https://github.com/lucaswerkmeister/repro-firefox-invisible-input; CC0). According to the original report, the invisible input was still sent when submitting the form (though in the reduced file I’ve removed the surrounding form).
Incomplete list of changes that all make the bug disappear:
- Changing the style from border to outline.
- Removing the column-count style.
- Removing either or both of the <dt> elements.
- Removing either or both of the <dd> elements (i.e. have the <input>s as direct children of the <dd>’s parents).
The bug also happens when dragging into the second input (and is in fact more obvious in that case, as you’d expect to see the URL you just dragged to show up). You can also replace the <dd> with a <div>, or remove the dragend listener, and the bug will persist, but I thought it would be more useful to keep those in the example: <dt> or <dd> without a surrounding <dl> is weird, and without the dragend handler the result looks more confusing, in my opinion.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Form Controls' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•4 years ago
|
||
Thanks for the bug report!
It looks like this is a regression -- I got a regression range using mozregression
:
INFO: Last good revision: fb2b08c6bc8c320127586fcedb2626e496bf3dcf (2020-07-07)
INFO: First bad revision: ee89deeb4fb6d12456c551c5ab4aaae151ceedae (2020-07-08)
INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=fb2b08c6bc8c320127586fcedb2626e496bf3dcf&tochange=ee89deeb4fb6d12456c551c5ab4aaae151ceedae
It's not immediately clear to me which commits in that range are likely to be related, though.
Comment 3•4 years ago
|
||
Aha, feels likely to be related to (probably regression from) bug 1645773:
Bug 1645773 - Make sure to reflow when author specified borders / backgrounds are changed if we're themed. r=jfkthame
https://hg.mozilla.org/mozilla-central/rev/2c022fc5b638633885787aa94f1e46a7e6713956
(In the attached testcase, the form fields are themed, and they change to unthemed when the drag option starts.)
Comment 4•4 years ago
|
||
Here's a more-reduced testcase.
STR:
Load the testcase and wait a second.
(If you had it open previously, use shift+ctrl+r -- the shift is necessary/helpful to reset form state, which is necessary in case you happened to have typed something longer in the relevant textbox here.)
EXPECTED RESULTS:
You should end up seeing the full text "Am I clipped?"
ACTUAL RESULTS:
Only a little bit of the letter "A" shows up. The contents of the autofocused textbox (the second one) are clipped to its original paint width (in this case the width that the initial "." value occupied).
If you change the width of your browser window, then the bug goes away. So it seems we're insufficiently reflowing in response to the form-widget theming change.
Updated•4 years ago
|
Comment 5•4 years ago
|
||
emilio, seems like this would be a good one for you to look at if you have cycles, given your formcontrol/theming work recently (and given that you were working on the regressing bug). I or someone else could take a look here too, though.
Comment 6•4 years ago
|
||
(updating/clarifying bug summary. Note that the dt/dd elements didn't end up being necessary in my reduced testcase, aside from having some display:block
wrappers and/or linebreaks in particular places.)
Assignee | ||
Comment 7•4 years ago
|
||
This particular case was broken by my patch, but it seems to happen just because of the dynamic reflow. Test-case incoming that also reproduces without the native inputs.
Assignee | ||
Comment 8•4 years ago
|
||
Assignee | ||
Comment 9•4 years ago
|
||
With prefixed appearance for improved bisection. The regression range I get with this test-case is:
Alice, I think you have cached builds for this range, is there any chance you could bisect this using those? If not, or if you're busy, that's totally fine of course! Just ni? me back and I'll try to manually bisect between those commits or something, because there's various things there that could be the culprit.
Thanks!
Comment 10•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #9)
Created attachment 9234632 [details]
Test-case 3 (no native appearance involved)With prefixed appearance for improved bisection. The regression range I get with this test-case is:
Alice, I think you have cached builds for this range, is there any chance you could bisect this using those? If not, or if you're busy, that's totally fine of course! Just ni? me back and I'll try to manually bisect between those commits or something, because there's various things there that could be the culprit.
Thanks!
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a632277d67072fa1312b57805d887121056002ab&tochange=8ad5fbc5b9358fc84aa43d9a1b19c851056b1f39
Assignee | ||
Comment 11•4 years ago
|
||
Thank you!
Updated•4 years ago
|
Assignee | ||
Comment 13•4 years ago
|
||
So I think this is a multicol / block reflow bug.
The issue is that we mark the second input as dirty when it gets the reflow request. During multicol reflow everything seems to go smoothly, but we hit this code and bail out, leaving the line marked as not dirty, and as such the stuff inside the page-break-inside: avoid
dirty.
When it changes further, we think it's already dirty so don't bother adding it to the dirty root list anymore and the text frame remains with its original tiny width.
Assignee | ||
Comment 14•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 15•4 years ago
|
||
Comment 17•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•