[Webkit-unassigned] [Bug 10614] New: DIV element does not support 'keypress' event attribute, contrary to w3c specification.

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Mon Aug 28 15:50:34 PDT 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=10614

           Summary: DIV element does not support 'keypress' event attribute,
                    contrary to w3c specification.
           Product: WebKit
           Version: 419.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: JavaScriptGlue
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: christopherbalz at yahoo.com


Test case attached.
After, for example, clicking on a div element (with or without scrollbars) in
an html page, the user presses a key, no keypress event is heard. 

The div element should emit the keypress event in this case, as it in fact does
on Internet Explorer.  Note that on Firefox (1.5), div elements that have
scrollbars showing do emit keypress events.  But all clickable and/or tabbable
div elements should do so.  See the w3c spec links below.  

Practical uses of this are custom JavaScript modal dialogs, as found at
vox.com, where the only way to hear keyboard events after the user clicks on a
non-scrollable div is to reset the current form-input-field focus to a form
input element.  Doing so disturbs the user's tab traversal of the dialog,
impeding usability and accessibility.  But not hearing the event means that the
user cannot close the dialog in the standard user-interface fashion by pressing
the 'esc' key.  

In the w3c HTML 4.01 Specification, at
http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.4, it is specified
that the 'div' element have as a member of its set of attributes the set of
entity events (%events), at
http://www.w3.org/TR/REC-html40/sgml/dtd.html#events.  This set includes
'keypress'.


Reproducible: Always

Steps to Reproduce:
 1. Open Test Case 
 2. Click on yellow-bordered box.
 3. Press a key.

Actual Results:  
 No keypress event is logged in the bottom box.

Expected Results:  
 A keypress event should be logged in the bottom box.


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list