i have a text input that is bound to focusin
/focusout
events.
$(element)
.focusin(function(e) {})
.focusout(function(e) {
var to = e.relatedTarget || e.toElement;
// undefined in chrome, fine in IE
});
on focusout
, i'm interested in the relatedTarget
information, i.e., the DOM element receiving focus as the text input loses focus, however this property is undefined
for the event.
on the other hand, toElement
, which i believe is the internet explorer equivalient of relatedTarget
, is available. in other words, my focusout
handler works fine in IE, but not in other browsers.
is there a workaround for the above limitation?