aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/mouse.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2015-12-02 18:20:54 +0100
committerFelix Nagel <info@felixnagel.com>2015-12-02 18:30:05 +0100
commitc10ef0a170218ae64abaee54518b09068eadb51e (patch)
tree8ff6c9cb8e0f4a8846a3b272a26e65fef946ae3c /ui/widgets/mouse.js
parent7ed45541096b58c56c4fc40b1a0ca9c10b2fe229 (diff)
parent6c738d961d9918f75a3043a49ab21ac79bca45ae (diff)
downloadjquery-ui-c10ef0a170218ae64abaee54518b09068eadb51e.tar.gz
jquery-ui-c10ef0a170218ae64abaee54518b09068eadb51e.zip
Merge branch 'master' into datepicker
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 ) {