Skip to content

Commit

Permalink
focus on SVG element breaks, so added code to ensure that the element…
Browse files Browse the repository at this point in the history
… has a focus function defined prior to executing the .focus() call.
  • Loading branch information
mikekoser committed Nov 17, 2014
1 parent 116182c commit a235147
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jquery.popupoverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@
// Focus back on saved element
setTimeout(function () {
if ($($el.data('focusedelementbeforepopup')).is(':visible')) {
$el.data('focusedelementbeforepopup').focus();
if ($el.data('focusedelementbeforepopup') && $el.data('focusedelementbeforepopup').focus) {
$el.data('focusedelementbeforepopup').focus();
}
}
}, 0);
}
Expand Down

0 comments on commit a235147

Please sign in to comment.