wp/wp-includes/js/jquery/ui/mouse.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 /*!
     1 /*!
     2  * jQuery UI Mouse 1.13.1
     2  * jQuery UI Mouse 1.13.3
     3  * http://jqueryui.com
     3  * https://jqueryui.com
     4  *
     4  *
     5  * Copyright jQuery Foundation and other contributors
     5  * Copyright OpenJS Foundation and other contributors
     6  * Released under the MIT license.
     6  * Released under the MIT license.
     7  * http://jquery.org/license
     7  * https://jquery.org/license
     8  */
     8  */
     9 
     9 
    10 //>>label: Mouse
    10 //>>label: Mouse
    11 //>>group: Widgets
    11 //>>group: Widgets
    12 //>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
    12 //>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
    13 //>>docs: http://api.jqueryui.com/mouse/
    13 //>>docs: https://api.jqueryui.com/mouse/
    14 
    14 
    15 ( function( factory ) {
    15 ( function( factory ) {
    16 	"use strict";
    16 	"use strict";
    17 
    17 
    18 	if ( typeof define === "function" && define.amd ) {
    18 	if ( typeof define === "function" && define.amd ) {
    19 
    19 
    20 		// AMD. Register as an anonymous module.
    20 		// AMD. Register as an anonymous module.
    21 		define( [
    21 		define( [
    22 			"jquery",
    22 			"jquery",
    23 			"./core"
    23 			"../ie",
       
    24 			"../version",
       
    25 			"../widget"
    24 		], factory );
    26 		], factory );
    25 	} else {
    27 	} else {
    26 
    28 
    27 		// Browser globals
    29 		// Browser globals
    28 		factory( jQuery );
    30 		factory( jQuery );
    34 $( document ).on( "mouseup", function() {
    36 $( document ).on( "mouseup", function() {
    35 	mouseHandled = false;
    37 	mouseHandled = false;
    36 } );
    38 } );
    37 
    39 
    38 return $.widget( "ui.mouse", {
    40 return $.widget( "ui.mouse", {
    39 	version: "1.13.1",
    41 	version: "1.13.3",
    40 	options: {
    42 	options: {
    41 		cancel: "input, textarea, button, select, option",
    43 		cancel: "input, textarea, button, select, option",
    42 		distance: 1,
    44 		distance: 1,
    43 		delay: 0
    45 		delay: 0
    44 	},
    46 	},
   144 		// Support: IE <9
   146 		// Support: IE <9
   145 		if ( this._mouseMoved ) {
   147 		if ( this._mouseMoved ) {
   146 
   148 
   147 			// IE mouseup check - mouseup happened when mouse was out of window
   149 			// IE mouseup check - mouseup happened when mouse was out of window
   148 			if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
   150 			if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
   149 				!event.button ) {
   151 					!event.button ) {
   150 				return this._mouseUp( event );
   152 				return this._mouseUp( event );
   151 
   153 
   152 				// Iframe mouseup check - mouseup occurred in another document
   154 			// Iframe mouseup check - mouseup occurred in another document
   153 			} else if ( !event.which ) {
   155 			} else if ( !event.which ) {
   154 
   156 
   155 				// Support: Safari <=8 - 9
   157 				// Support: Safari <=8 - 9
   156 				// Safari sets which to 0 if you press any of the following keys
   158 				// Safari sets which to 0 if you press any of the following keys
   157 				// during a drag (#14461)
   159 				// during a drag (#14461)
   158 				if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
   160 				if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
   159 					event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
   161 						event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
   160 					this.ignoreMissingWhich = true;
   162 					this.ignoreMissingWhich = true;
   161 				} else if ( !this.ignoreMissingWhich ) {
   163 				} else if ( !this.ignoreMissingWhich ) {
   162 					return this._mouseUp( event );
   164 					return this._mouseUp( event );
   163 				}
   165 				}
   164 			}
   166 			}