Javascript cannot cancel accesskey on an <input> tag.

NEW
Unassigned

Status

()

Core
DOM
12 years ago
8 years ago

People

(Reporter: Shlomi Fish, Unassigned)

Tracking

(Depends on: 1 bug)

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2

One cannot cancel an accesskey on an <input tag using the following Javascript code:

<<<<<<<<<<<
function accesskeys()
{
    var elems = document.getElementsByTagName("*");
    for (var i=0; i<elems.length; i++)
    {
        elems[i].accessKey = "";
    }
}
window.onload = accesskeys;
>>>>>>>>>>>>>>

cancelling an accesskey on <a /> elements works fine using this method. The
HTMLs in:

http://www.shlomifish.org/bugs/mozilla/remove-accesskeys/

demonstrate the problem.

Reproducible: Always

Steps to Reproduce:
1. Go to http://www.shlomifish.org/bugs/mozilla/remove-accesskeys/test-js.html
2. Press Alt+F (or whatever is the access method for accesskey="f")
3. Press Alt+B.

Actual Results:  
Alt+F went to the File menu. Alt+B went to the input box instead of the
Bookmarks menu.

Expected Results:  
Alt+B should have went to the bookmarks menu.

Comment 1

12 years ago
confirmed with linux trunk 2005041705

inputElement.accessKey is "" after the DOM call, but the accesskey still works.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Frames don't watch the AttributeChanged notification for accesskey.  Content
nodes do it right... See also bug 278623
Depends on: 278623
Assignee: general → nobody
QA Contact: ian → general
You need to log in before you can comment on or make changes to this bug.