Bug Tracker

Opened 10 years ago

Closed 10 years ago

#4260 closed bug (invalid)

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

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 (1)

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

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by fracmak

Attachment: test.html added

comment:1 in reply to:  description Changed 10 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 10 years ago by fracmak

ah, I understand, thanks, you can close this

comment:3 Changed 10 years ago by brandon

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