aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/mouse.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widgets/mouse.js')
-rw-r--r--ui/widgets/mouse.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/ui/widgets/mouse.js b/ui/widgets/mouse.js
index 938d0f4b7..c14aebe53 100644
--- a/ui/widgets/mouse.js
+++ b/ui/widgets/mouse.js
@@ -8,7 +8,7 @@
*/
//>>label: Mouse
-//>>group: UI Core
+//>>group: Widgets
//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
//>>docs: http://api.jqueryui.com/mouse/
@@ -146,7 +146,16 @@ return $.widget( "ui.mouse", {
// Iframe mouseup check - mouseup occurred in another document
} else if ( !event.which ) {
- return this._mouseUp( event );
+
+ // Support: Safari <=8 - 9
+ // Safari sets which to 0 if you press any of the following keys
+ // during a drag (#14461)
+ if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
+ event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
+ this.ignoreMissingWhich = true;
+ } else if ( !this.ignoreMissingWhich ) {
+ return this._mouseUp( event );
+ }
}
}
@@ -188,8 +197,9 @@ return $.widget( "ui.mouse", {
delete this._mouseDelayTimer;
}
+ this.ignoreMissingWhich = false;
mouseHandled = false;
- return false;
+ event.preventDefault();
},
_mouseDistanceMet: function( event ) {