[Webkit-unassigned] [Bug 52606] New: keyLocation for KeyboardEvent object doesn't always have correct value

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 17 18:58:58 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=52606

           Summary: keyLocation for KeyboardEvent object doesn't always
                    have correct value
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows XP
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: webkit at nczonline.net


When a keyboard event is fired, the keyLocation property of the event object is always either 0 (for main keyboard) or 3 (for numeric keypad), but never 1 (for left) or 2 (for right). Since I believe keyLocation is intended to mimic the location property as defined in DOM Level 3 Events, I think this is a bug.

I've tested with the following code:

var textbox = document.getElementById("myTextbox");
textbox.addEventListener("keydown", function(event){
    alert(event.keyLocation);
}, false);

Then, try the left Shift key and the right Shift key. For the left Shift key, the value of keyLocation should be 1 and for the right Shift key it should be 2.

Note: I am on Windows, I don't have a Mac to verify if it's just a Windows issue.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list