page up/down when focus is in text field should scroll containing page
Categories
(Core :: DOM: UI Events & Focus Handling, enhancement, P5)
Tracking
()
People
(Reporter: akkzilla, Unassigned)
References
(Blocks 2 open bugs)
Details
(5 keywords)
Attachments
(2 files, 1 obsolete file)
1.47 KB,
patch
|
Details | Diff | Splinter Review | |
768 bytes,
text/html
|
Details |
Comment 1•25 years ago
|
||
Comment 4•25 years ago
|
||
Reporter | ||
Comment 5•25 years ago
|
||
Comment 6•25 years ago
|
||
Reporter | ||
Comment 7•25 years ago
|
||
Comment 8•25 years ago
|
||
Comment 11•25 years ago
|
||
Updated•25 years ago
|
Reporter | ||
Comment 14•25 years ago
|
||
Comment 15•25 years ago
|
||
Comment 16•25 years ago
|
||
Comment 18•25 years ago
|
||
Comment 20•25 years ago
|
||
Updated•25 years ago
|
Comment 21•25 years ago
|
||
Comment 22•25 years ago
|
||
Comment 24•25 years ago
|
||
Reporter | ||
Comment 25•25 years ago
|
||
Comment 26•25 years ago
|
||
Reporter | ||
Comment 27•25 years ago
|
||
Comment 28•25 years ago
|
||
Comment 29•25 years ago
|
||
Comment 30•25 years ago
|
||
Comment 31•25 years ago
|
||
Comment 32•25 years ago
|
||
Reporter | ||
Comment 34•25 years ago
|
||
Comment 35•25 years ago
|
||
Comment 36•25 years ago
|
||
Comment 37•25 years ago
|
||
Comment 38•25 years ago
|
||
Updated•25 years ago
|
Reporter | ||
Comment 39•25 years ago
|
||
Reporter | ||
Comment 40•25 years ago
|
||
Comment 41•25 years ago
|
||
Comment 42•25 years ago
|
||
Updated•25 years ago
|
Comment 44•24 years ago
|
||
Updated•24 years ago
|
Comment 45•24 years ago
|
||
Comment 46•24 years ago
|
||
Updated•24 years ago
|
Updated•23 years ago
|
Comment 47•23 years ago
|
||
Updated•23 years ago
|
Comment 48•23 years ago
|
||
Comment 49•23 years ago
|
||
Comment 50•23 years ago
|
||
Comment 51•23 years ago
|
||
Comment 52•23 years ago
|
||
Comment 53•23 years ago
|
||
Comment 54•23 years ago
|
||
Comment 55•23 years ago
|
||
Comment 56•23 years ago
|
||
Comment 57•23 years ago
|
||
Comment 58•23 years ago
|
||
Comment 60•23 years ago
|
||
Comment 61•23 years ago
|
||
Comment 62•22 years ago
|
||
Comment 63•18 years ago
|
||
Updated•16 years ago
|
Comment 65•14 years ago
|
||
Comment 69•10 years ago
|
||
Comment 70•7 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 71•5 years ago
|
||
Hello 21-yo thread! Please fix this problem. It is crucial to my comfort to have this function on websites. I need the "Page Down" button to actually scroll the page when text field is focused. Please, I don't want to go back to Chrome for this function.
Updated•3 years ago
|
Updated•1 year ago
|
Comment 72•1 year ago
|
||
(In reply to Randell Jesup [:jesup] (needinfo me) from comment #38)
My 2 cents: page up/down should scroll the item with focus if it's
scrollable.
If it's not scrollable, pop out one level, wash, rinse, and repeat. Simple,
makes sense to people, doesn't surprise people.
I think I'd prefer this version of the expected behaviour. However, maybe one clarification is to scroll the item with focus if it's "scrollable in the direction". That means if you are scrolling down in a textarea, and you are at the end of the textarea, we will pop out of the textarea to start scrolling the parent.
This closely follows the expected behaviour when using the mousewheel to scroll and the cursor is hovering over a textarea: When the textarea is scrollable in the desired direction, scroll the textarea. If not, scroll the parent.
This preserves the expected user behaviour of allowing scrolling inside the focused element while also allowing scrolling the parent as well.
Comment 73•1 year ago
|
||
Hi James,
It looks to me that this bug and bug 1239595 are duplicates. I am flagging you here because I am not quite sure if/how my action of setting duplication causes unexpected tracking consequences for the Web Compatibility:Knowledge Base bugs. These two platform bugs block different Knowledge Base bugs.
Comment 74•1 year ago
|
||
If they're dupes the right thing do do is to dupe the core bugs, dupe the knowledge base bugs, and ensure that the remaining kb bug is updated to block all the known site reports, and maybe add some text to the kb bug about the additional symptoms to look for. Unfortunately we don't yet have tooling to handle this automatically.
Comment 76•11 months ago
|
||
Hi Jamie and Masayuki,
We had discussions in bug 1806931 comment 14 which I believe is relevant to this issue. Apparently there are webcompat interests here, while there are also a11y concerns. Is there a compromised-but-acceptable solution to both webcompat and a11y? Bug 1806931 comment 14 seems to indicate no, but I wanted to ensure we're all aligned with the conclusion and the next steps. Thanks.
Comment 77•11 months ago
|
||
Well, we could redirect the commands to nsISelectionController
for the page here. So, technically, it's fixable without big patches.
On the other hand, I'm still worry about new complaints about the new/Chrome behavior. I think that we need scenarios that when users feel inconvenient with current behavior to solve the a11y concerns.
Comment 78•11 months ago
|
||
I agree that the concerns are contradictory and I haven't come up with any compromise solution. That said, regarding web compat, as I understand it, Chromium have acknowledged that they consider the current Chromium behaviour to be a bug. If they were to fix this, that would partially resolve the web compat issue here in a way which is better for accessibility. Of course, it's difficult to know if/when this is likely to get attention from them.
Comment 80•11 months ago
|
||
(In reply to James Teh [:Jamie] from comment #78)
I agree that the concerns are contradictory and I haven't come up with any compromise solution. That said, regarding web compat, as I understand it, Chromium have acknowledged that they consider the current Chromium behaviour to be a bug. If they were to fix this, that would partially resolve the web compat issue here in a way which is better for accessibility. Of course, it's difficult to know if/when this is likely to get attention from them.
Good reminder! We're going to take this to our contact on the Chromium team.
Comment 81•11 months ago
|
||
If I understand correctly, the Chromium bug is about a textarea (e.g. in the bug report: "Type some text on the textarea"), while the Mozilla bug is about single-line text fields (in the bug description: "Since text fields don't know how to scroll", which is not true for textareas).
Comment 82•11 months ago
|
||
(In reply to Vincent Lefevre from comment #81)
If I understand correctly, the Chromium bug is about a textarea (e.g. in the bug report: "Type some text on the textarea"), while the Mozilla bug is about single-line text fields (in the bug description: "Since text fields don't know how to scroll", which is not true for textareas).
That's true. However, as I noted in bug 1806931 comment 13:
[Not consuming page up /down is] perhaps reasonable for single line inputs, which is the case here. I'd argue it isn't reasonable for multi-line inputs, though, and contentEditables can't specify whether they're multi-line or not in a standard way as far as I know, so this also applies there.
Also, in bug 1806931 comment 14, :masayuki noted:
Even a single line input may have big height like a multi-line input. Therefore, I think it could make users confused too.
Comment 83•11 months ago
|
||
There are pages that put the focus in a text field by default. So the current behavior is rather bad. Or perhaps there should be an option to control the behavior.
Comment 84•11 months ago
|
||
I don't think it's constructive to argue about this at length :), but to provide an alternative perspective, it's debatable whether the browser's behaviour is bad or whether the site is behaving badly. Arguably, the browser is doing exactly what it's supposed to do: when focus is in a text field, cursor navigation and scrolling should be restricted to the text field. If the intention is that the page should be immediately scrollable by the user, the page shouldn't set focus to a text field in the first place.
An option is one possibility, but this is obscure enough that I suspect most users won't know what the option means or won't know to look for it.
Updated•11 months ago
|
Comment 85•11 months ago
|
||
(In reply to James Teh [:Jamie] from comment #84)
An option is one possibility, but this is obscure enough that I suspect most users won't know what the option means or won't know to look for it.
When affected by an issue or wanting a different behavior, users often search the web (now, there's also AI) and will find the answer if the option is present.
BTW, Firefox could also also detect that the [Page Up] / [Page Down] keys are used in a single-line text input while they have no effect and propose the option as a tip.
Comment 86•11 months ago
|
||
So, as the patch author from 22 years ago... I don't think my patch will apply anymore. :-) I regret not pushing people to do something, however - we could have had a partial fix 22 years ago. However, what my patch tried to do could still be valid (fix this for the 1-line text input case). It really sounds like Chrome isn't likely to change their behavior anytime soon. I don't think our users will get that annoyed if we fix the one-line text case.
masayuki - you indicated it can be fixed for the simple case fairly easily, correct?
Comment 87•11 months ago
|
||
Yeah, I think so. sInputHandlers
does not register the PageUp
and PageDown
as page scroll keys. So, it can have them, and SelectionMoveCommands
can redirect the command to PresShell
.
Updated•9 months ago
|
Comment 88•8 months ago
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #87)
Yeah, I think so.
sInputHandlers
does not register thePageUp
andPageDown
as page scroll keys. So, it can have them, andSelectionMoveCommands
can redirect the command toPresShell
.
Hey Masayuki and here,
Trying to push for a clear next step here. Am I right that we can go implement the 1-line text input case without waiting on the Chrome bug to be fixed? Or should I mark this bug as webcompat:blocked instead?
Comment 89•8 months ago
|
||
I meant that it's easy to change our behavior for aligning to Chrome, but Jamie and I (and also the Chrome's bug reporter) don't think that Chrome's behavior is reasonable. So, I think Chrome developers should change their behavior unless they believe their behavior is better.
Updated•8 months ago
|
Comment 90•5 months ago
|
||
Here's a testcase, for convenience with testing this issue, and to help with reasoning about how our behavior currently differs from other browsers (and how this issue differs from e.g. bug 1239595 which was brought up as a possible-dupe but I think is in fact quite different).
STR for this testcase:
- Scroll down a bit and click to focus the text input or the textarea.
- Press your PageDown key repeatedly.
EXPECTED RESULTS:
After one or more PageDown keypresses (enough to reach the end of the text control), any subsequent PageDown keypresses should cause the top-level document to be scrolled. (In particular: when no more scrolling/caret-moving can be done inside the text control, then additional PageDown keypresses should be targeted at the nearest containing scrollport; along the lines of jesup's intuition in comment 38.) This is what happens for mousewheel scrolling, basically.
ACTUAL RESULTS:
PageDown just stops having any effect once the caret reaches the end of the text control.
Firefox gives ACTUAL RESULTS.
Chromium/WebKit give EXPECTED RESULTS.
Description
•