Ticket #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: | ||
| 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
Change History
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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

