Closed
Bug 251986
Opened 20 years ago
Closed 20 years ago
Keyboard scrolling does not work for elements such as div using overflow - auto or scroll
Categories
(Core :: XUL, defect, P2)
Core
XUL
Tracking
()
RESOLVED
FIXED
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: access, polish, testcase)
Attachments
(2 files, 2 obsolete files)
(deleted),
patch
|
roc
:
review+
dbaron
:
superreview+
asa
:
approval-aviary-
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review |
Spawned from bug 97283.
Robert O'Callahan wrote in bug 97283 comment 125:
>For keyboard scrolling, I think we should do a similar search but start the
>search at the frame where the caret is (effectively, the frame that was last
>clicked or focused).
Patch coming up that does that...
David Baron wrote in bug 97283 comment 120:
>Also, I think frames/iframes and 'overflow' should not be distinguishable
>to the user based on their scrolling / focus behavior.
Regarding scrolling: yes. The patch does not address the focus issue,
which can be handled in a separate bug if we want that. I have checked what
IE6.0/XP and Opera 7.52/Linux does and neither supports focus on generic
overflow:scroll elements.
Assignee | ||
Comment 1•20 years ago
|
||
Implements what is said in comment 0. Note that the scrolling is not
"recursive" in the sense that mouse scrolling is - that is, when the end
position is reached the enclosing scrollable element is not scrolled.
Mouse position is not involved at all.
This is exactly what IE6.0/XP and Opera7.52/Linux does, as far as I can tell.
Assignee | ||
Comment 2•20 years ago
|
||
Assignee | ||
Comment 3•20 years ago
|
||
Comment on attachment 153581 [details] [diff] [review]
Patch rev. 1
Note for reviewers:
The static helper function 'GetNearestScrollingView' is copy-pasted
from 'nsEventStateManager::GetNearestScrollingView' - maybe this
code should live in somewhere else? (nsIScrollableView?)
Attachment #153581 -
Flags: superreview?(dbaron)
Attachment #153581 -
Flags: review?(roc)
Assignee | ||
Comment 4•20 years ago
|
||
If someone could test the patch on Windows that would be great.
I have only tested it on Linux.
Assignee | ||
Comment 5•20 years ago
|
||
Since this was spawned from bug 97283: requesting the same flags.
Flags: blocking1.8a3?
Flags: blocking-aviary1.0?
Updated•20 years ago
|
Flags: blocking-aviary1.0RC1?
Comment 6•20 years ago
|
||
(In reply to comment #4)
> If someone could test the patch on Windows that would be great.
> I have only tested it on Linux.
I've tested this patch on Windows, I've build it with MingW.
Afaict, the patch works great in all the complex testcases (precisely as
intended). Thank you very much!
(In reply to comment #3)
> (From update of attachment 153581 [details] [diff] [review])
> Note for reviewers:
> The static helper function 'GetNearestScrollingView' is copy-pasted
> from 'nsEventStateManager::GetNearestScrollingView' - maybe this
> code should live in somewhere else? (nsIScrollableView?)
You should move it to nsLayoutUtils and have them both reference it there.
Other than that, it looks just right. Fix the patch and repost it, and I'll
stamp the review...
Comment 8•20 years ago
|
||
Comment on attachment 153581 [details] [diff] [review]
Patch rev. 1
Looks good to me as well, but instead of just moving it, make it iterative
instead of recursive too. :-)
Assignee | ||
Comment 9•20 years ago
|
||
Added an iterative nsLayoutUtils::GetNearestScrollingView() that has an
ASSERTION if it's passed a null view, something the old code didn't have.
I have eliminated nsTypedSelection::GetClosestScrollableView() too (in
nsSelection.cpp).
I have checked all call sites and they should be OK regarding the null view
(the old ESM code would have crashed on that anyway).
Attachment #153581 -
Attachment is obsolete: true
Attachment #153582 -
Attachment is obsolete: true
Assignee | ||
Comment 10•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #153581 -
Flags: superreview?(dbaron)
Attachment #153581 -
Flags: review?(roc)
Assignee | ||
Updated•20 years ago
|
Attachment #153968 -
Flags: superreview?(dbaron)
Attachment #153968 -
Flags: review?(roc)
Attachment #153968 -
Flags: review?(roc) → review+
Comment 11•20 years ago
|
||
If this is reviewed and checked in shortly, we'll take it for aviary1.0
Flags: blocking-aviary1.0RC1?
Flags: blocking-aviary1.0RC1+
Flags: blocking-aviary1.0?
Flags: blocking-aviary1.0-
Updated•20 years ago
|
Attachment #153968 -
Flags: superreview?(dbaron) → superreview+
Updated•20 years ago
|
Priority: -- → P2
Comment 12•20 years ago
|
||
Mats, could you also take a look at bug 63663?
Assignee | ||
Comment 13•20 years ago
|
||
I can scroll the testcase in bug 63663 both by mouse-wheel and keyboard
so I guess the patch here and bug 97283 fixes that one too (I have some other
stuff in my tree also so I can't be completely sure, but almost ;).
Blocks: 63663
Comment 14•20 years ago
|
||
(In reply to comment #13)
> I can scroll the testcase in bug 63663 both by mouse-wheel and keyboard
> so I guess the patch here and bug 97283 fixes that one too (I have some other
> stuff in my tree also so I can't be completely sure, but almost ;).
Okay when you check it in I'll do more testing.
Comment 15•20 years ago
|
||
Perhaps bug 194904 is also something that could quite easily be fixed with these
patches :)
Assignee | ||
Comment 16•20 years ago
|
||
-> FIXED
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Summary: [FIX] Keyboard scrolling does not work for elements such as div using overflow - auto or scroll → Keyboard scrolling does not work for elements such as div using overflow - auto or scroll
Assignee | ||
Updated•20 years ago
|
Flags: blocking1.8a3?
Comment 17•20 years ago
|
||
Need testcase.
Comment 18•20 years ago
|
||
Here's the testcase:
http://bugzilla.mozilla.org/attachment.cgi?id=51338&action=view
Two problems with the fix:
1. You have to click in there to get focus to the scrollable div.
2. Once you click there you can't see focus via a dotted outline
Should we REOPEN or file a new bug? Perhaps "tabbing and focus appearance not
working on overflow: auto or position: fixed"
Comment 19•20 years ago
|
||
I think nsIFrame::IsFocusable(PRBool *aIsTabbable) needs to be changed to return
true and *aIsTabbable = PR_TRUE for cases with overflow: auto or position: fixed.
Assignee | ||
Comment 20•20 years ago
|
||
> Need testcase.
Use the three testacases in bug 97283 labeled "complex 1", they cover all cases
I could think of.
> 1. You have to click in there to get focus to the scrollable div.
> 2. Once you click there you can't see focus via a dotted outline
That is a separate problem. The question is, do we really want anything with a
scroll view take part in tabbing? Open a new bug if you think so (maybe it's
even reported). I took a quick glance at Opera and they don't do it.
Comment 21•20 years ago
|
||
Comment on attachment 153968 [details] [diff] [review]
Patch rev. 2
Putting on approval radar
Attachment #153968 -
Flags: approval-aviary?
Updated•20 years ago
|
Flags: blocking-aviary1.0PR+ → blocking-aviary1.0PR-
Comment 22•20 years ago
|
||
Comment on attachment 153968 [details] [diff] [review]
Patch rev. 2
not this late in the game and think we have trunk regressions for this.
Attachment #153968 -
Flags: approval-aviary? → approval-aviary-
Comment 23•6 years ago
|
||
Keywords: sec508
You need to log in
before you can comment on or make changes to this bug.
Description
•