Skip to main content

Bug Tracker

Side navigation

#4260 closed bug (invalid)

Opened February 26, 2009 07:29PM UTC

Closed April 22, 2009 04:52AM UTC

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 (0.6 KB) - added by fracmak February 26, 2009 07:30PM UTC.
Change History (3)

Changed March 01, 2009 02:48AM UTC by bentruyman comment:1

Replying to [ticket:4260 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.

Changed March 02, 2009 03:20PM UTC by fracmak comment:2

ah, I understand, thanks, you can close this

Changed April 22, 2009 04:52AM UTC by brandon comment:3

resolution: → invalid
status: newclosed