Open Bug 290801 Opened 19 years ago Updated 2 years ago

Javascript cannot cancel accesskey on an <input> tag.

Categories

(Core :: DOM: Core & HTML, defect, P5)

x86
Linux
defect

Tracking

()

People

(Reporter: shlomif, Unassigned)

References

(Depends on 1 open bug, )

Details

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.
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
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.