Closed
Bug 915962
Opened 11 years ago
Closed 9 years ago
Space to scroll region does not work on elements with tabIndex set
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: nicholas.j.santos, Assigned: ehsan.akhgari)
References
Details
(Whiteboard: [bugday-20150710])
Attachments
(3 files, 1 obsolete file)
3.98 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
2.65 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
2.00 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36 Steps to reproduce: Here is a page that demonstrates the issue: http://jsfiddle.net/gzEJc/2/ Repro steps: 1) Create a div element with overflow: auto, overflowing content, and tabIndex = -1 2) Click into that element 3) Hit the spacebar Actual results: Nothing happens. Expected results: The div should scroll down. This works as expected on Chrome, Safari, and IE10. Notice that using arrow keys to scroll does work on Gecko. It's just the spacebar-based scrolling that's broken.
Reporter | ||
Comment 1•11 years ago
|
||
Real user agent string is Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0 though I checked that the issue is reproducible on both Windows and OSX.
Comment 2•11 years ago
|
||
Based on discussion in https://github.com/reddit/reddit/issues/607 this is also a regression in FF17.
Keywords: regressionwindow-wanted
Comment 3•11 years ago
|
||
I can reproduce since Version 1.0 at least. So, I think this is not a regression.
Comment 4•11 years ago
|
||
I am seeing this bug in Firefox nightly 27.0a1 (2013-10-02), Mac OS X (10.8.5)
Comment 5•9 years ago
|
||
I think this bug and bug 102663 should be fixed by inverting the spacebar logic: from: scroll if [document, html link, or xhtml link] to: scroll if not [editable or form element] https://hg.mozilla.org/mozilla-central/file/68e752bfd992/dom/xbl/nsXBLPrototypeHandler.cpp#l481 ehsan, are you interested in fixing this?
Status: UNCONFIRMED → NEW
Component: General → Event Handling
Ever confirmed: true
Flags: needinfo?(ehsan)
Keywords: regressionwindow-wanted
OS: Windows 7 → All
Hardware: x86_64 → All
Assignee | ||
Comment 6•9 years ago
|
||
Sure, but my plate is pretty full these days, so it may be a while before I can get to this. Leaving the needinfo for now...
Assignee: nobody → ehsan
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(ehsan)
Assignee | ||
Comment 7•9 years ago
|
||
Attachment #8594396 -
Flags: review?(roc)
Assignee | ||
Comment 8•9 years ago
|
||
This is based on test_bug549262.html.
Attachment #8594397 -
Flags: review?(roc)
Comment on attachment 8594396 [details] [diff] [review] Part 1: Allow pressing space to scroll the document if an editable element or form control is not focused Review of attachment 8594396 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/xbl/nsXBLPrototypeHandler.cpp @@ +484,5 @@ > + // If the focus is in a form control, don't scroll. > + nsCOMPtr<nsIFormControl> formControl = > + do_QueryInterface(focusedContent); > + if (formControl) { > + return NS_OK; What if the focus is on content that's a descendant of the form control, e.g. a particular chunk of text in a <button>? Maybe that can't happen normally, but I think it could happen if a page programmatically sets the selection. Anyway this seems a little fragile to me. Seems like we should bail out here if there is any form control ancestor. Or maybe form controls should be prevenDefault()ing the space-key events they consume?
Attachment #8594396 -
Flags: review?(roc)
Attachment #8594397 -
Flags: review?(roc) → review+
Assignee | ||
Comment 10•9 years ago
|
||
I think it makes sense to look for a form control ancestor. I'll do that.
Assignee | ||
Comment 11•9 years ago
|
||
Attachment #8594396 -
Attachment is obsolete: true
Attachment #8594539 -
Flags: review?(roc)
Attachment #8594539 -
Flags: review?(roc) → review+
Comment 12•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/79aeff6684f6 https://hg.mozilla.org/integration/mozilla-inbound/rev/ec40bfefa08d
https://hg.mozilla.org/mozilla-central/rev/79aeff6684f6 https://hg.mozilla.org/mozilla-central/rev/ec40bfefa08d
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Backed out for crashing whenever you press spacebar with nothing focused. http://hg.mozilla.org/mozilla-central/rev/41cda3ce8c98
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 15•9 years ago
|
||
Attachment #8595467 -
Flags: review?(roc)
Attachment #8595467 -
Flags: review?(roc) → review+
Comment 16•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a2f82a1b15e https://hg.mozilla.org/integration/mozilla-inbound/rev/579ad8bc3ccf https://hg.mozilla.org/integration/mozilla-inbound/rev/183d3acaef74
https://hg.mozilla.org/mozilla-central/rev/1a2f82a1b15e https://hg.mozilla.org/mozilla-central/rev/579ad8bc3ccf https://hg.mozilla.org/mozilla-central/rev/183d3acaef74
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
QA Whiteboard: [good first verify]
Updated•9 years ago
|
QA Whiteboard: [good first verify] → [good first verify][bugday-20150710]
Whiteboard: [bugday-20150710]
Comment 18•9 years ago
|
||
I used tabindex in div element,the scrolling was not done by the spacebar. It was found on firefox nightly( 26.0a1)windows 32 bit: BuildID 20130912030201 User Agent Mozilla/5.0 (Windows NT 6.3; rv:26.0) Gecko/20100101 Firefox/26.0 And I found scrolling with spacebar is working fine with tabindex set, on latest beta 40.0b3 Build ID 20150709163524 User Agent Mozilla/5.0 (Windows NT 6.3; rv:40.0) Gecko/20100101 Firefox/40.0 [bugday-20150710]
Comment 19•8 years ago
|
||
I have reproduced this bug with Firefox Nightly 26.0a1 on Windows 7(64-bit) with the instructions from comment 0. Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 Verified as fixed with Latest Firefox Aurora 45.0a2 (Build ID : 20160115004002) Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0 [testday-20160115]
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•