Opened 9 years ago
Closed 9 years ago
#14740 closed bug (notabug)
'focus' event is not being triggered on elements that are no attached to the document
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Test case: http://jsfiddle.net/DtVq7/1/
Add a 'focus' event listener on an input that's not part of the DOM, trigger 'focus' on it, the callback is not getting fired. When you attach it to the DOM and trigger 'focus' again the callback will get fired. 'blur' works for both cases.
Change History (2)
comment:2 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
It doesn't make sense to "focus" an element not in a document. If you want to just call its handlers, use .triggerHandler()
.
Note: See
TracTickets for help on using
tickets.
This is happening on all browsers