Closed Bug 544632 Opened 14 years ago Closed 14 years ago

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

Categories

(Firefox :: Keyboard Navigation, defect)

x86_64
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 544146

People

(Reporter: kevinar18, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

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....
Attached file 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
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
Closed: 14 years ago
Resolution: --- → INVALID
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)
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: