focus event.relatedTarget the Firefox way (no way)
If you happen to handle an event via a jQuery focus event handler and wanting to know where the focus went?
Hello event.relatedTarget!
Now you're in clouds of joy and happines, flying softly over your app code, doing amazing things... Until the Firefox Boeing Jumbojet hits you on your forehead and you fall down, wingless and suffering.
Firefox event object has a relatedTarget property, which always stays null.
Seems to be a known issue (https://bugzilla.mozilla.org/show_bug.cgi?id=962251), waiting for W3C specs to clarify (http://www.w3.org/TR/DOM-Level-2-Events/events.html).
Hopefully soon we can fly again..
Written by Nickey Kolev
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#