Closed Bug 313685 Opened 19 years ago Closed 8 years ago

Spacebar both toggles checkbox and scrolls if it is the child of an 'a' element

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: boards, Unassigned)

References

()

Details

(Keywords: regression, testcase)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9a1) Gecko/20051024 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9a1) Gecko/20051024 Firefox/1.6a1

Spacebar is both used for scrolling navigation and for toggling the state of a form element when focusing on it.  However, when you toggle the state of, say, a checkbox, using the spacebar, the screen will also scroll.  Definitely doesn't seem to be intended functionality, and seems to be due to something similar to Bug 53896, although since that was fixed, I somehow doubt it's the same cause.

Reproducible: Always

Steps to Reproduce:
1. Focus onto a checkbox
2. Hit the spacebar
Actual Results:  
Toggles checkbox and scrolls down.

Expected Results:  
Toggle checkbox, that's it.
I'm also guessing that this might be related to Bug 214843 and its patch.
Keywords: regression
Unrelated spam: Brendan accidentally cited this bug in a checkin comment when he meant to cite bug 313684.
confirming Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20051023 SeaMonkey/1.1a

It is scrolling down to the bottom. Select one of the checkboxes there and scroll a bit up, so you still see it, and press spacebar multiple times.
First time page scrolls to the bottom and checkbox changes state,
next times page can't scroll down anymore, only checkbox changes state. 
Status: UNCONFIRMED → NEW
Ever confirmed: true
As I wrote in Bug 441200, this happens if the scrollbar is the child of an 'a' element. I put a reduced testcase in URL.

PS: I didn't checked if the bug happens also with a parent other than 'a'. I only verified it doesn't happen if 'a' is removed from the testcase.
Keywords: testcase
Summary: Spacebar both toggles checkbox and scrolls. → Spacebar both toggles checkbox and scrolls if it is the child of an 'a' element
Assignee: events → nobody
QA Contact: ian → events
Reproduced with recent Firefox versions.
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17
Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0
Mozilla/5.0 (X11; Linux x86_64; rv:6.0a2) Gecko/20110527 Firefox/6.0a2
Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110527 Firefox/7.0a1
I encounter this bug in Firefox 32.0.3 Mac. 
The "Vote" feature here on Bugzilla shows this bug. 
I click "Vote". 
In the resulting page, the check box is focused in blue. 
I press Space. 

* Expected result : * 

The box gets toggled.

* Actual result : * 

The box gets toggled AND the page scrolls down. This is incorrect. And this has a perverse effect : Because of the scrolling down, the user thinks that the check box has not been toggled.
This bug is present in Firefox Developer Edition 40.0a2 (2015-05-20) on both Windows and OS X.
I was going to report a duplicate. Win7, Nightly 42.0a1 (2015-08-07).
Confirm this bug with testcase:   data:text/html,<body style="height:4000px"><input type="checkbox">
See Also: → 1192461
I can not reproduce this issue on: 

 	Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
        Mozilla/5.0 (Windows NT 6.3; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0

As the actual result is the box gets toggled WITHOUT the page scrolling down. I will close this issue as works for me. If this issue persists, please feel free to reopen.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
So, comment 10 and comment 11 were describing Bug 1180761 (e10s-specific). That one is resolved too
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.