You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by ts...@apache.org on 2015/03/17 16:57:47 UTC
wicket git commit: WICKET-5858
Repository: wicket
Updated Branches:
refs/heads/wicket-6.x 313565b4b -> 95d65069b
WICKET-5858
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/95d65069
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/95d65069
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/95d65069
Branch: refs/heads/wicket-6.x
Commit: 95d65069ba45d611182afc8332614f128ad7ea36
Parents: 313565b
Author: Tobias Soloschenko <ts...@apache.org>
Authored: Tue Mar 17 16:52:15 2015 +0100
Committer: Tobias Soloschenko <ts...@apache.org>
Committed: Tue Mar 17 16:55:33 2015 +0100
----------------------------------------------------------------------
.../java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/95d65069/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index 82467ed..5f3871a 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -2649,14 +2649,15 @@
Wicket.Log.info("Calling focus on " + WF.lastFocusId);
try {
if (WF.focusSetFromServer) {
- toFocus.focus();
+ // WICKET-5858
+ window.setTimeout(function () { toFocus.focus(); }, 0);
} else {
// avoid loops like - onfocus triggering an event the modifies the tag => refocus => the event is triggered again
var temp = toFocus.onfocus;
toFocus.onfocus = null;
- toFocus.focus();
+
// IE needs setTimeout (it seems not to call onfocus sync. when focus() is called
- window.setTimeout(function () {toFocus.onfocus = temp; }, 0);
+ window.setTimeout(function () {toFocus.focus(); toFocus.onfocus = temp; }, 0);
}
} catch (ignore) {
}