If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Space bar loads javacript url instead of scrolling down page (accessibility.browsewithcaret = True)

RESOLVED DUPLICATE of bug 544146

Status

()

Firefox
Keyboard Navigation
RESOLVED DUPLICATE of bug 544146
8 years ago
8 years ago

People

(Reporter: Kevin Ar18, Unassigned)

Tracking

({testcase})

Trunk
x86_64
Windows Vista
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20100123 Minefield/3.7a1pre (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.3a1pre) Gecko/20100123 Minefield/3.7a1pre (.NET CLR 3.5.30729)

Summary:
Given the following code:
<input type="button" onclick="document.location.href='http://mozilla.org/'">
The spacebar will not scroll the page, but incorrectly loads the url.

Reproducible: Always

Steps to Reproduce:
1. Make a page with the following code:
<input type="button" onclick="document.location.href='http://mozilla.org/'">
2. Press the space bar as though you wanted to scroll down.
Actual Results:  
The onclick trigger occurs and the page changes to mozilla.org

Expected Results:  
Spacebar should scroll if there is space to scroll or do nothing (if there is no space to scroll).  Why? the button does not have focus.

I have not tracked down when this bug started, but it has been present for over 6 months (at least).  I'll wait and see if anyone finds a duplicate before I try and track down where the problem started as I'm guessing it might be a regression -- but that's really just hopeful guessing on my part. :)

Testcase to follow....
(Reporter)

Comment 1

8 years ago
Created attachment 425618 [details]
Minimal example of bug

Here's a testcase.  The basic steps are as follows:
1. Load page
2. Hit spacebar

Make sure you don't do anything else between steps 1 & 2, like press the down arrow.

From what I could tell, the minimal amount of code to make this bug show up was as follows:
<input type="button" onclick="document.location.href='http://mozilla.org/'">
(of course you can replace http://mozilla.org/ with any URL)
It has to be type="button"

Note: in the testcase I added some <br> tags so the page will display a scrollbar; but this part is not necessary to reproduce the bug.
WFM with Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20100205 Minefield/3.7a1pre (.NET CLR 3.5.30729) ID:20100205042817. Can you test in a new profile?
Keywords: testcase
Version: unspecified → Trunk
(Reporter)

Comment 3

8 years ago
Confirmed not present in a clean profile.

I was thinking about this very same thing last night/early today -- that I should have checked a clean profile before I posted.  Sorry about that.

Status -> Resolved: Invalid

I'll still probably do some tests to see if I can find what did cause it... just to be sure.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
(Reporter)

Comment 4

8 years ago
Ok, narrowed down the problem.  It only happens when browsewithcaret (F7) is enabled.

accessibility.browsewithcaret: True == bug shows up
accessibility.browsewithcaret: False == no bug

The input field can be anywhere on the page, but the bug is still present.

So... I'm guessing this makes it a legitimate bug....

Status -> Unconfirmed

Of course, I'll wait for some others to respond and see if this should be "VERIFIED" before doing any additional testing.


Similar bugs (not duplicates):
Bug 202157
Bug 206633
Bug 205846
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Summary: Space bar loads javacript url instead of scrolling down page → Space bar loads javacript url instead of scrolling down page (accessibility.browsewithcaret = True)
(Reporter)

Updated

8 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 544146
You need to log in before you can comment on or make changes to this bug.