[Webkit-unassigned] [Bug 19731] New: should support focusin event

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 23 14:13:02 PDT 2008


           Summary: should support focusin event
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: PC
               URL: http://www.despair.com
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ovafai at gmail.com

The country dropdown in the checkout form on this site is broken. Each time you
blur, then focus on the dropdown, the selected item is reset to the first item.
The problem is that webkit is getting sent down the IE codepath because it
supports event.srcElement, but doesn't have the focusin event.

The code does something like:
function onFocusIn(e) {
  if (e.srcElement) {
    e.srcElement.tmpIndex = e.srcElement.selectedIndex;

function onFocus(e) {
  if (e.srcElement) {
    e.srcElement.selectedIndex = e.srcElement.tmpIndex;

It's supposed to workaround some IE bug. In either case, webkit only hits the
second codepath, which resets the selectedIndex to the first item (since
tmpIndex is undefined). FF avoids both codepaths by not supporting srcElement.

Test case for the focusin problem coming. According to
http://msdn.microsoft.com/en-us/library/ms536935(VS.85).aspx, it looks like
focusin fires when the document's activeElement gets focus and it fires
*before* the focus event.

Configure bugmail: https://bugs.webkit.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