Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2202,7 +2202,8 @@

var safeFocus = function() {
try {
toFocus.trigger('focus');
// toFocus is not a JQuery object. Thus use focus.
toFocus.focus();
} catch (ignore) {
// WICKET-6209 IE fails if toFocus is disabled
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
// ... restore old focus
if (oldActive) {
try {
oldActive.trigger('focus');
// oldActive is not a JQuery element. Then use focus
oldActive.focus();
Wicket.Log.debug("trap-focus: restored focus to element ", oldActive);
} catch (error) {
Wicket.Log.error("trap-focus: error restoring focus. Attempted to set focus to element, but got an exception", oldActive, error);
Expand Down