This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 615bec1  [WICKET-6661] Upgrade to jquery 3.4.1
615bec1 is described below

commit 615bec1a5ccf5211f0acbee61cbee48b0f2ca350
Author: Matt Pavlovich <[email protected]>
AuthorDate: Thu May 2 09:57:30 2019 -0500

    [WICKET-6661] Upgrade to jquery 3.4.1
    
    (cherry picked from commit 1c64e7f3eff4a1044c8f7f166c763af6f4515a70)
---
 testing/wicket-js-tests/Gruntfile.js               |  4 +-
 .../wicket/resource/JQueryResourceReference.java   |  2 +-
 .../wicket/resource/jquery/jquery-3.4.0.min.js     |  2 -
 .../jquery/{jquery-3.4.0.js => jquery-3.4.1.js}    | 52 +++++++++++++---------
 .../wicket/resource/jquery/jquery-3.4.1.min.js     |  2 +
 5 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/testing/wicket-js-tests/Gruntfile.js 
b/testing/wicket-js-tests/Gruntfile.js
index d7c034f..70dc7e4 100644
--- a/testing/wicket-js-tests/Gruntfile.js
+++ b/testing/wicket-js-tests/Gruntfile.js
@@ -108,7 +108,7 @@ module.exports = function(grunt) {
                                        urls: [
                                                
'http://localhost:38887/test/js/all.html?1.12.4',
                                                
'http://localhost:38887/test/js/all.html?2.2.4',
-                                               
'http://localhost:38887/test/js/all.html?3.4.0'
+                                               
'http://localhost:38887/test/js/all.html?3.4.1'
                                        ]
                                }
                        },
@@ -121,7 +121,7 @@ module.exports = function(grunt) {
                                        urls: [
                                                
'http://localhost:38887/test/js/amd.html?1.12.4',
                                                
'http://localhost:38887/test/js/amd.html?2.2.4',
-                                               
'http://localhost:38887/test/js/amd.html?3.4.0'
+                                               
'http://localhost:38887/test/js/amd.html?3.4.1'
                                        ]
                                }
                        }
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/JQueryResourceReference.java
 
b/wicket-core/src/main/java/org/apache/wicket/resource/JQueryResourceReference.java
index 5676f58..1c85ad4 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/JQueryResourceReference.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/JQueryResourceReference.java
@@ -45,7 +45,7 @@ public class JQueryResourceReference extends 
JavaScriptResourceReference
         * JQuery ver. 3.x - improves on ver. 2
         * <strong>Note</strong>: Might not work with old jQuery plugins!
         */
-       public static final String VERSION_3 = "jquery/jquery-3.4.0.js";
+       public static final String VERSION_3 = "jquery/jquery-3.4.1.js";
 
        public static final JQueryResourceReference INSTANCE_1 = new 
JQueryResourceReference(VERSION_1);
        public static final JQueryResourceReference INSTANCE_2 = new 
JQueryResourceReference(VERSION_2);
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.0.min.js
 
b/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.0.min.js
deleted file mode 100644
index 769a1d9..0000000
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.0.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery v3.4.0 | (c) JS Foundation and other contributors | 
jquery.org/license */
-!function(e,t){"use strict";"object"==typeof module&&"object"==typeof 
module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw
 new Error("jQuery requires a window with a document");return 
t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use 
strict";var 
t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof
 e& [...]
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.0.js 
b/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.1.js
similarity index 99%
rename from 
wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.0.js
rename to 
wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.1.js
index be2e6af..773ad95 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.0.js
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.1.js
@@ -1,5 +1,5 @@
 /*!
- * jQuery JavaScript Library v3.4.0
+ * jQuery JavaScript Library v3.4.1
  * https://jquery.com/
  *
  * Includes Sizzle.js
@@ -9,7 +9,7 @@
  * Released under the MIT license
  * https://jquery.org/license
  *
- * Date: 2019-04-10T19:48Z
+ * Date: 2019-05-01T21:04Z
  */
 ( function( global, factory ) {
 
@@ -142,7 +142,7 @@ function toType( obj ) {
 
 
 var
-       version = "3.4.0",
+       version = "3.4.1",
 
        // Define a local copy of jQuery
        jQuery = function( selector, context ) {
@@ -4498,8 +4498,12 @@ var documentElement = document.documentElement;
                },
                composed = { composed: true };
 
+       // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
        // Check attachment across shadow DOM boundaries when possible (gh-3504)
-       if ( documentElement.attachShadow ) {
+       // Support: iOS 10.0-10.2 only
+       // Early iOS 10 versions support `attachShadow` but not `getRootNode`,
+       // leading to errors. We need to check for `getRootNode`.
+       if ( documentElement.getRootNode ) {
                isAttached = function( elem ) {
                        return jQuery.contains( elem.ownerDocument, elem ) ||
                                elem.getRootNode( composed ) === 
elem.ownerDocument;
@@ -5359,8 +5363,7 @@ jQuery.event = {
 
                                // Claim the first handler
                                if ( rcheckableType.test( el.type ) &&
-                                       el.click && nodeName( el, "input" ) &&
-                                       dataPriv.get( el, "click" ) === 
undefined ) {
+                                       el.click && nodeName( el, "input" ) ) {
 
                                        // dataPriv.set( el, "click", ... )
                                        leverageNative( el, "click", returnTrue 
);
@@ -5377,8 +5380,7 @@ jQuery.event = {
 
                                // Force setup before triggering a click
                                if ( rcheckableType.test( el.type ) &&
-                                       el.click && nodeName( el, "input" ) &&
-                                       dataPriv.get( el, "click" ) === 
undefined ) {
+                                       el.click && nodeName( el, "input" ) ) {
 
                                        leverageNative( el, "click" );
                                }
@@ -5419,7 +5421,9 @@ function leverageNative( el, type, expectSync ) {
 
        // Missing expectSync indicates a trigger call, which must force setup 
through jQuery.event.add
        if ( !expectSync ) {
-               jQuery.event.add( el, type, returnTrue );
+               if ( dataPriv.get( el, type ) === undefined ) {
+                       jQuery.event.add( el, type, returnTrue );
+               }
                return;
        }
 
@@ -5434,9 +5438,13 @@ function leverageNative( el, type, expectSync ) {
                        if ( ( event.isTrigger & 1 ) && this[ type ] ) {
 
                                // Interrupt processing of the outer synthetic 
.trigger()ed event
-                               if ( !saved ) {
+                               // Saved data should be false in such cases, 
but might be a leftover capture object
+                               // from an async native handler (gh-4350)
+                               if ( !saved.length ) {
 
                                        // Store arguments for use when 
handling the inner native event
+                                       // There will always be at least one 
argument (an event object), so this array
+                                       // will not be confused with a leftover 
capture object.
                                        saved = slice.call( arguments );
                                        dataPriv.set( this, type, saved );
 
@@ -5449,14 +5457,14 @@ function leverageNative( el, type, expectSync ) {
                                        if ( saved !== result || notAsync ) {
                                                dataPriv.set( this, type, false 
);
                                        } else {
-                                               result = undefined;
+                                               result = {};
                                        }
                                        if ( saved !== result ) {
 
                                                // Cancel the outer synthetic 
event
                                                
event.stopImmediatePropagation();
                                                event.preventDefault();
-                                               return result;
+                                               return result.value;
                                        }
 
                                // If this is an inner synthetic event for an 
event with a bubbling surrogate
@@ -5471,17 +5479,19 @@ function leverageNative( el, type, expectSync ) {
 
                        // If this is a native event triggered above, 
everything is now in order
                        // Fire an inner synthetic event with the original 
arguments
-                       } else if ( saved ) {
+                       } else if ( saved.length ) {
 
                                // ...and capture the result
-                               dataPriv.set( this, type, jQuery.event.trigger(
-
-                                       // Support: IE <=9 - 11+
-                                       // Extend with the prototype to reset 
the above stopImmediatePropagation()
-                                       jQuery.extend( saved.shift(), 
jQuery.Event.prototype ),
-                                       saved,
-                                       this
-                               ) );
+                               dataPriv.set( this, type, {
+                                       value: jQuery.event.trigger(
+
+                                               // Support: IE <=9 - 11+
+                                               // Extend with the prototype to 
reset the above stopImmediatePropagation()
+                                               jQuery.extend( saved[ 0 ], 
jQuery.Event.prototype ),
+                                               saved.slice( 1 ),
+                                               this
+                                       )
+                               } );
 
                                // Abort handling of the native event
                                event.stopImmediatePropagation();
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.1.min.js
 
b/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.1.min.js
new file mode 100644
index 0000000..a1c07fd
--- /dev/null
+++ 
b/wicket-core/src/main/java/org/apache/wicket/resource/jquery/jquery-3.4.1.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | 
jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof 
module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw
 new Error("jQuery requires a window with a document");return 
t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use 
strict";var 
t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof
 e& [...]

Reply via email to