You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/02/06 09:52:00 UTC
[13/38] git commit: WICKET-5010 Improve wicket-ajax.js to be able to
work with jQuery 1.9+
WICKET-5010 Improve wicket-ajax.js to be able to work with jQuery 1.9+
Always use jqEvent.target. No need to check for srcElement - jQuery cares about this for us.
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/67f4e86a
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/67f4e86a
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/67f4e86a
Branch: refs/heads/reference-guide
Commit: 67f4e86acf64edc9d207ecb70ca6b945bf94983b
Parents: 68294d5
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Jan 28 15:53:04 2013 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Jan 28 15:53:04 2013 +0100
----------------------------------------------------------------------
.../wicket/ajax/res/js/wicket-ajax-jquery.js | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/67f4e86a/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 adbb3df..c929699 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
@@ -2246,9 +2246,7 @@
setFocus: function (event) {
event = Wicket.Event.fix(event);
- // IE doesn't have the property "target".
- // Use "srcElement" instead.
- var target = event.target ? event.target : event.srcElement;
+ var target = event.target;
if (target) {
Wicket.Focus.refocusLastFocusedComponentAfterResponse = false;
Wicket.Focus.lastFocusId = target.id;
@@ -2259,9 +2257,7 @@
blur: function (event) {
event = Wicket.Event.fix(event);
- // IE doesn't have the property "target".
- // Use "srcElement" instead.
- var target = event.target ? event.target : event.srcElement;
+ var target = event.target;
if (target && Wicket.Focus.lastFocusId === target.id) {
if (Wicket.Focus.refocusLastFocusedComponentAfterResponse) {
// replaced components seem to blur when replaced only on Safari - so do not modify lastFocusId so it gets refocused