Bug Tracker

Opened 9 years ago

Closed 8 years ago

#5055 closed bug (worksforme)

In IE, focussing on newly created elements is erratic

Reported by: william_mc Owned by: brandon
Priority: minor Milestone: 1.4
Component: event Version: 1.3.2
Keywords: focus Cc:
Blocked by: Blocking:


If you create an element with jQuery, and attempt a focus, whether it succeeds or not depends on what kind of element previously held focus. The attached code works in IE, but only because the focussing is put in a setTimeout call. Without the setTimeout, it fails. Works fine either way in FF3 and Chrome.

Attachments (2)

resptest.html (1.0 KB) - added by william_mc 9 years ago.
iebug.html (1.9 KB) - added by william_mc 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by william_mc

Attachment: resptest.html added

comment:1 Changed 9 years ago by william_mc

Looking at this further, there is another case where IE loses track of who has focus & won't put it back correctly. In the attached file, there are 3 buttons which replace themselves with an input field. The first one doesn't redirect focus properly. The second one does, when clicked. The third one (which initially has focus) does when the return key is pressed, but requires strange and bizarre incantations involving the body keypress handler and moving focus around.

Changed 9 years ago by william_mc

Attachment: iebug.html added

comment:2 Changed 9 years ago by william_mc

sorry, forgot to say that the three-button file is called iebug.html. Why can't you add attachments to changes in the bug tracker?

comment:3 Changed 8 years ago by dmethvin

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.