You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by pa...@apache.org on 2014/03/13 08:20:19 UTC
[1/2] git commit: WICKET-5517 Added support for detection of IE11 in
Wicket.Browser.isIE()
Repository: wicket
Updated Branches:
refs/heads/master d970656fc -> 3a44d2e4a
WICKET-5517 Added support for detection of IE11 in Wicket.Browser.isIE()
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4a37da92
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4a37da92
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4a37da92
Branch: refs/heads/master
Commit: 4a37da9214d091c554bbfda358b1aeddc536a161
Parents: d970656
Author: Luke Niesink <lu...@topicus.nl>
Authored: Tue Feb 25 16:15:06 2014 +0100
Committer: Emond Papegaaij <em...@topicus.nl>
Committed: Thu Mar 13 08:19:10 2014 +0100
----------------------------------------------------------------------
.../java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/4a37da92/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
index b914fdb..898bbdb 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
@@ -53,7 +53,7 @@
},
isIE: function () {
- return !Wicket.Browser.isSafari() && typeof(document.all) !== "undefined" && typeof(window.opera) === "undefined";
+ return !Wicket.Browser.isSafari() && (typeof(document.all) !== "undefined" || window.navigator.userAgent.indexOf("Trident/")>-1) && typeof(window.opera) === "undefined";
},
isIEQuirks: function () {
@@ -78,6 +78,10 @@
var version = parseFloat(window.navigator.userAgent.substring(index + 5));
return Wicket.Browser.isIE() && version < 9;
},
+
+ isIELessThan11: function () {
+ return !Wicket.Browser.isSafari() && typeof(document.all) !== "undefined" && typeof(window.opera) === "undefined";
+ },
isIE11: function () {
var userAgent = window.navigator.userAgent;
[2/2] git commit: WICKET-5517 Use Wicket.Browser.isIELessThan11() as
the behaviour of Wicket.Browser.isIE() has changed
Posted by pa...@apache.org.
WICKET-5517 Use Wicket.Browser.isIELessThan11() as the behaviour of Wicket.Browser.isIE() has changed
Conflicts:
wicket-core/src/test/js/event.js
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/3a44d2e4
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/3a44d2e4
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/3a44d2e4
Branch: refs/heads/master
Commit: 3a44d2e4a7a6d1573753a579920fa44fb74a5d5b
Parents: 4a37da9
Author: Luke Niesink <lu...@topicus.nl>
Authored: Tue Feb 25 16:16:35 2014 +0100
Committer: Emond Papegaaij <em...@topicus.nl>
Committed: Thu Mar 13 08:20:05 2014 +0100
----------------------------------------------------------------------
.../ajax/res/js/wicket-ajax-jquery-debug.js | 2 +-
.../wicket/ajax/res/js/wicket-ajax-jquery.js | 4 ++--
wicket-core/src/test/js/event.js | 4 ++--
.../html/autocomplete/wicket-autocomplete.js | 2 +-
.../ajax/markup/html/modal/res/modal.js | 22 ++++++++++----------
5 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/3a44d2e4/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js
index d9089d1..573b6ac 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js
@@ -179,7 +179,7 @@
// Special style for Internet 6 and 7 in quirks mode
- if (Wicket.Browser.isIE() && (Wicket.Browser.isIEQuirks() || !Wicket.Browser.isIE7())) {
+ if (Wicket.Browser.isIELessThan11() && (Wicket.Browser.isIEQuirks() || !Wicket.Browser.isIE7())) {
html +=
"<a id='"+self.wicketDebugLink+"' style='position:absolute; right: 10px; bottom: 10px; z-index:1000000; padding-top: 0.3em; padding-bottom: 0.3em; line-height: normal ; _padding-top: 0em; width: 12em; border: 1px solid black; background-color: white; text-align: center; opacity: 0.7; filter: alpha(opacity=70); color: blue; " +
" left: expression(-10 - wicketDebugLink.offsetWidth + eval(document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) +(document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth));"+
http://git-wip-us.apache.org/repos/asf/wicket/blob/3a44d2e4/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 b449b23..2b9d501 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
@@ -2104,7 +2104,7 @@
var content = Wicket.DOM.serializeNodeChildren(node);
// create stylesheet
- if (Wicket.Browser.isIE()) {
+ if (Wicket.Browser.isIELessThan11()) {
try {
document.createStyleSheet().cssText = content;
return FunctionsExecuter.DONE;
@@ -2676,7 +2676,7 @@
setup: function () {
- if (Wicket.Browser.isIE()) {
+ if (Wicket.Browser.isIELessThan11()) {
jQuery(this).on('keydown', function (event) {
jQuery.event.special.inputchange.keyDownPressed = true;
http://git-wip-us.apache.org/repos/asf/wicket/blob/3a44d2e4/wicket-core/src/test/js/event.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/js/event.js b/wicket-core/src/test/js/event.js
index 9ccba5e..08efb58 100644
--- a/wicket-core/src/test/js/event.js
+++ b/wicket-core/src/test/js/event.js
@@ -327,7 +327,7 @@ jQuery(document).ready(function() {
stop();
- if (Wicket.Browser.isIE()) {
+ if (Wicket.Browser.isIELessThan11()) {
expect(3);
} else {
expect(1);
@@ -338,7 +338,7 @@ jQuery(document).ready(function() {
ok(true, "inputchange event is triggered!");
});
- if (Wicket.Browser.isIE()) {
+ if (Wicket.Browser.isIELessThan11()) {
$input.trigger("paste");
$input.trigger("keyup");
$input.trigger("cut");
http://git-wip-us.apache.org/repos/asf/wicket/blob/3a44d2e4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
index 95229a3..7444edc 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
@@ -683,7 +683,7 @@
hideIndicator();
// hack for a focus issue in IE, WICKET-2279
- if (Wicket.Browser.isIE()) {
+ if (Wicket.Browser.isIELessThan11()) {
var range = document.selection.createRange();
if (range !== null) {
range.select();
http://git-wip-us.apache.org/repos/asf/wicket/blob/3a44d2e4/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 159b4b5..befc625 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -119,7 +119,7 @@
var dx = 0;
var dy = 0;
- if (Wicket.Browser.isIE() || Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
+ if (Wicket.Browser.isIELessThan11() || Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -137,7 +137,7 @@
var dx = 0;
var dy = 0;
- if (Wicket.Browser.isIE() || Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
+ if (Wicket.Browser.isIELessThan11() || Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
dx = Wicket.Window.getScrollX();
dy = Wicket.Window.getScrollY();
}
@@ -369,7 +369,7 @@
this.bottom = _(idBottom);
this.captionText = _(idCaptionText);
- if (Wicket.Browser.isIE()) {
+ if (Wicket.Browser.isIELessThan11()) {
// IE stupid 3px bug - not fixed even in IE7 quirks!
if (Wicket.Browser.isIE7() === false || Wicket.Browser.isIEQuirks()) {
this.topLeft.style.marginRight = "-3px";
@@ -382,7 +382,7 @@
// HACK - IE doesn't support position:fixed. Gecko does, however for a reason
// we need to have background position: absolute, which makes the movement of
// the window really jerky if the window stays position: fixed
- if (Wicket.Browser.isIE() || Wicket.Browser.isGecko()) {
+ if (Wicket.Browser.isIELessThan11() || Wicket.Browser.isGecko()) {
this.window.style.position = "absolute";
}
@@ -479,7 +479,7 @@
var scTop = 0;
var scLeft = 0;
- if (Wicket.Browser.isIE() || Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
+ if (Wicket.Browser.isIELessThan11() || Wicket.Browser.isGecko() || Wicket.Browser.isSafari()) {
scLeft = Wicket.Window.getScrollX();
scTop = Wicket.Window.getScrollY();
}
@@ -838,7 +838,7 @@
this.adjustOpenWindowsStatusAndZIndexesOnClose();
- if (Wicket.Browser.isIE()) {
+ if (Wicket.Browser.isIELessThan11()) {
// There's a strange focus problem in IE that disables focus on entire page,
// unless something focuses an input
var e = document.createElement("input");
@@ -902,7 +902,7 @@
* Called when dragging has started.
*/
onBegin: function(object) {
- if (this.isIframe() && (Wicket.Browser.isGecko() || Wicket.Browser.isIE() || Wicket.Browser.isSafari())) {
+ if (this.isIframe() && (Wicket.Browser.isGecko() || Wicket.Browser.isIELessThan11() || Wicket.Browser.isSafari())) {
this.revertList = [];
Wicket.Iframe.documentFix(document, this.revertList);
}
@@ -1289,7 +1289,7 @@
// HACK - it really sucks that we have to set this to absolute even for gecko.
// however background with position:fixed makes the text cursor in textfieds
// in modal window disappear
- if (Wicket.Browser.isIE() || Wicket.Browser.isGecko()) {
+ if (Wicket.Browser.isIELessThan11() || Wicket.Browser.isGecko()) {
e.style.position = "absolute";
}
@@ -1449,7 +1449,7 @@
return;
}
- if (Wicket.Browser.isIE() && Wicket.Browser.isIE7() === false) {
+ if (Wicket.Browser.isIELessThan11() && Wicket.Browser.isIE7() === false) {
this.boxes = [];
var selects = doc.getElementsByTagName("select");
for (var i = 0; i < selects.length; i++) {
@@ -1507,7 +1507,7 @@
}
// explorer doesn't need this, because for IE disableTabs() is called.
// plus in IE this causes problems because it scrolls document );
- if (Wicket.Browser.isIE() === false) {
+ if (Wicket.Browser.isIELessThan11() === false) {
this.focusRevertList = [];
var body = doc.getElementsByTagName("body")[0];
for (var i = 0; i < body.childNodes.length; ++i) {
@@ -1545,7 +1545,7 @@
if (typeof (this.tabbableTags) === "undefined") {
this.tabbableTags = ["A", "BUTTON", "TEXTAREA", "INPUT", "IFRAME", "SELECT"];
}
- if (Wicket.Browser.isIE()) {
+ if (Wicket.Browser.isIELessThan11()) {
this.disabledTabsRevertList = [];
for (var j = 0; j < this.tabbableTags.length; j++) {
var tagElements = doc.getElementsByTagName(this.tabbableTags[j]);