Bug Tracker

Modify

Ticket #4260 (closed bug: invalid)

Opened 4 years ago

Last modified 4 years ago

focus/blur events no longer work with jquery created inputs

Reported by: fracmak Owned by: brandon
Priority: major Milestone: 1.4
Component: event Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

when you create an input using jquery: ex $("<input/>") and attach a focus or blur event to it, the events are never fired. I've attached an example of it not working.

Attachments

test.html Download (567 bytes) - added by fracmak 4 years ago.

Change History

Changed 4 years ago by fracmak

comment:1 in reply to: ↑ description Changed 4 years ago by bentruyman

Replying to fracmak:

when you create an input using jquery: ex $("<input/>") and attach a focus or blur event to it, the events are never fired. I've attached an example of it not working.

The attached example (test.html) won't work as the focus event is not being attached to the created input, but rather the #insert element. This is because the append method doesn't return a jQuery object of the newly created elements. You could use appendTo to get the functionality you're seeking.

comment:2 Changed 4 years ago by fracmak

ah, I understand, thanks, you can close this

comment:3 Changed 4 years ago by brandon

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

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.