Bug Tracker

Modify

Ticket #5055 (closed bug: worksforme)

Opened 5 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

Description

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

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

Change History

Changed 5 years ago by william_mc

comment:1 Changed 5 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 5 years ago by william_mc

comment:2 Changed 5 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 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.