Entered text scrolled out of view after Ctrl+Home on long document followed by entering text and hitting enter
Categories
(Core :: Layout: Scrolling and Overflow, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
thunderbird_esr60 | --- | unaffected |
thunderbird_esr68 | --- | affected |
firefox-esr60 | --- | unaffected |
firefox-esr68 | --- | verified |
firefox69 | --- | wontfix |
firefox70 | --- | wontfix |
firefox71 | --- | wontfix |
firefox72 | --- | wontfix |
firefox73 | --- | verified |
firefox74 | --- | verified |
People
(Reporter: craig, Assigned: masayuki)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
14.20 KB,
text/html
|
Details | |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr68+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
Steps to reproduce:
Open email
Click reply
Click control-home to type at top of email
Enter a line of text
Press return
The text just typed disappears off the top of the window and you have to scroll up to see it.
Until recently, the window auto scrolled and kept the top line in view.
This is annoying, as I'd like to see what I've typed.
Using 68.1.0 (32-bit)
Actual results:
Text unexpectedly scrolls out of sight
Expected results:
Text is still visible.
Comment 1•5 years ago
|
||
Confirmed.
If you really want to answer above the quote, I suggest you configure that in the account settings: Composition & A dressing: "Start my reply above the quote".
The downside of your Ctrl+Home method is that you insert your text into the "cite prefix":
<div class="moz-cite-prefix">On 28 Aug 2019 13:17, someone wrote:</div>
That has some undesired side effects.
That said, we can still look where the scrolling behaviour changed, but it's most likely an issue in the Mozilla platform code.
Alice, can you please find the regression for us:
Configure TB to start the reply below the quote. Reply to a long e-mail, hit Ctrl+Home, type something into the cite prefix, hit enter. What you just types has now scrolled out of view.
Comment 2•5 years ago
|
||
Configure TB to start the reply below the quote
How?
the cite prefix
What is?
Comment 3•5 years ago
|
||
In the account settings under Composition & A dressing: "Start my reply below the quote".
When you reply, you'll automatically get a "On 28 Aug 2019 13:17, someone wrote:". That's the cite prefix. So if you do Ctrl+Home and start typing, you'll type into the cite prefix before the "On".
Comment 4•5 years ago
|
||
Regression Window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=0c6c2007dfae49051206ba3e52a1fbf14f89d608&tochange=277f7d1fd5527cb886549c76870aeaf68d265ebb
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6317367156ddbc537c700dbd9a8ebdf1e371ae8a&tochange=340d5146c4052a47c5aa4f70817dc3ee9fd4e7da
Regressed by: Bug 1305957
Indeed, layout.css.scroll-anchoring.enabled=false fixes the issue.
Comment 5•5 years ago
|
||
Thank you so much, Alice.
As I suspected, this comes from a change in the Mozilla platform code. It actually doesn't happen in Firefox, if you open the attached page and type right a the front and hit return, the typed line is not scrolled out of view.
I don't think will devote too much effort into fixing this, Craig, please try the preference or follow the steps in comment #2.
Comment 6•5 years ago
|
||
I can reproduce the issue with the Attached file long-email.html on Nightly71.0a1 Windows10.
Steps
- Open Attached file long-email.html
- Scroll to bottom
- Click somewhere so that caret will appear
- hit Ctrl+Home,
- type something
- hit [Enter] key
Comment 7•5 years ago
|
||
I can also reproduce the issue on Firefox68.0.2.
Comment 8•5 years ago
|
||
Regressed by: Bug 1305957
Updated•5 years ago
|
Comment 9•5 years ago
|
||
Thanks again, Alice. I was wrong. The key is to scroll to the bottom first, then click there, then use Ctrl+Home, then type, then hit enter. I'm still on FF 60.9 ESR, so I don't see it there, but of course it's present in the current released version.
Comment 11•5 years ago
|
||
Too late for 70 but we could still take a patch in 71.
Comment 13•5 years ago
|
||
Masayuki-san, could you look at this?
Assignee | ||
Comment 14•5 years ago
|
||
Hmm, if it caused by scroll anchoring, it's really not my area and also it'd be removed entirely.
https://groups.google.com/forum/#!topic/mozilla.dev.platform/66jW_XKCZew
Comment 15•5 years ago
|
||
I can probably take a look if it's a scroll anchoring regression, but probably you just need to set overflow-anchor: none
on the relevant node to get the previous behavior.
Comment 16•5 years ago
|
||
Hmm, that would be somewhere in the <editor> element in the TB compose window. I'll take a look.
Comment 17•5 years ago
|
||
STR
- Start Nightly72.0a1
- Open https://www-archive.mozilla.org/editor/midasdemo/
- type something and hit Enter
- Repeat step3 until the editor will be overflowed
- Crtl+Home
- type something and hit Enter
Actual results:
Last typed text in step6 unexpectedly scrolls out of sight
Chrome does not.
So this is definitely Firefox core bug.
Comment 18•5 years ago
|
||
Thanks for the comment, Alice. So in view of comment #17 there shouldn't be a Thunderbird-only solution, right?
Comment 19•5 years ago
|
||
Well, I mean, for the point of view of scroll-anchoring, this is working as expected: Pressing enter inserts content on top of the anchor, so in order to keep the anchor visually on top we adjust the scroll position back. The issue is that in this case the content insertion moving stuff down is what the user wants, because the user is editing, so the page or the editor should use overflow-anchor: none
.
Maybe Gecko should have overflow-anchor: none
in contenteditable regions by default somehow, so that editable content isn't chosen as an anchor, but setting overflow-anchor: none
on the editable html
document in comment 17 fixes it for me.
Assignee | ||
Comment 21•5 years ago
|
||
Yeah, sounds reasonable to me. But this might not be reproducible only with contenteditable
but also <textarea>
and <input>
(when its font-size
is too big). And for avoiding other regressions, the style should be applied only when :forcus
pseudo-class is matched. But unfortunately, in designMode
, nobody can be focused. So, the style could be:
*:-moz-read-write:focus,
*:root:-moz-read-write {
overflow-anchor: none;
}
?
Comment 22•5 years ago
|
||
I'm not sure about textarea and input, but the scroller in those is the anonymous div I think, so we could apply overflow-anchor: none to that.
The rule in comment 21 sounds reasonable to me, without the redundant *
selectors.
Comment 23•5 years ago
|
||
We have shipped our last beta for 71 and this is an unfixed P3, so this is wontfix for 71.
Comment 24•4 years ago
|
||
Masayuki, are you planning to return to this for 73?
Assignee | ||
Comment 25•4 years ago
|
||
Well, I try to write a patch for the CSS and create test described in comment 17.
Assignee | ||
Comment 27•4 years ago
|
||
Sigh, the symptom is not reproducible with synthesized events... So, a patch comes without automated test.
Comment 28•4 years ago
|
||
Marking this as fix-optional for 73 to remove it from weekly regression triage. We can still take a patch for 73 or 74.
Assignee | ||
Comment 30•4 years ago
|
||
This patch disables scroll-anchoring of all editable elements including editable
and scrollable elements in editing host because users don't want to scroll down
when they insert new line and new line can be in the scrolled area.
Unfortunately, the bug is not reproducible with simple testcase with
synthesized keyboard events. Therefore, this patch does not include automated
tests.
Comment 31•4 years ago
|
||
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/3cbc74c83a6e Disable scroll-anchoring at all editable elements r=emilio
Comment 32•4 years ago
|
||
bugherder |
Comment 33•4 years ago
|
||
This looks pretty low-risk to uplift if you want to nominate it for Beta and ESR68 approval.
Assignee | ||
Comment 34•4 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #33)
This looks pretty low-risk to uplift if you want to nominate it for Beta and ESR68 approval.
WDYT, emilio?
Assignee | ||
Comment 36•4 years ago
|
||
Comment on attachment 9121215 [details]
Bug 1583135 - Disable scroll-anchoring at all editable elements r=emilio!
Beta/Release Uplift Approval Request
- User impact if declined: Typing something in rich text editor causes unexpected scroll.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: See comment 17.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Just disabling scroll-anchoring in editable content.
- String changes made/needed:
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 37•4 years ago
|
||
Verified as fixed on Windows 10 x64 and on Windows 7 x86 on Firefox Nightly 74.0a1 (2020-01-21).
Comment 38•4 years ago
|
||
Comment on attachment 9121215 [details]
Bug 1583135 - Disable scroll-anchoring at all editable elements r=emilio!
Disables scroll anchoring in editable elements to avoid unexpected scroll behavior in some situations. Approved for 73.0b8 and 68.5esr.
Comment 39•4 years ago
|
||
Thanks, TB users will appreciate this (and we don't have to do it ourselves).
Comment 40•4 years ago
|
||
bugherder uplift |
Comment 41•4 years ago
|
||
bugherder uplift |
Comment 42•4 years ago
|
||
Verified as fixed on Windows 10 x64 and on Windows 7 x86 on Firefox 73.0b8.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 43•4 years ago
|
||
Verified fixed with Firefox 68.5.0esr (20200203194112) on Windows 10x64 and Windows 7x64.
Updated•2 years ago
|
Description
•