mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
core (mouse): preventDefault in most cases instead of returning false, that blocks all bubbling events (fixed #3552)
This commit is contained in:
parent
8e734e4a22
commit
42da86279e
@ -462,7 +462,11 @@ $.ui.mouse = {
|
||||
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
||||
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
||||
|
||||
return $.browser.safari; //Fix for safari to allow selecting select options
|
||||
// preventDefault() is used to prevent the selection of text here -
|
||||
// however, in Safari, this causes select boxes not to be selectable
|
||||
// anymore, so this fix is needed
|
||||
if(!$.browser.safari) event.preventDefault();
|
||||
return true;
|
||||
},
|
||||
|
||||
_mouseMove: function(event) {
|
||||
@ -473,7 +477,7 @@ $.ui.mouse = {
|
||||
|
||||
if (this._mouseStarted) {
|
||||
this._mouseDrag(event);
|
||||
return false;
|
||||
return event.preventDefault();
|
||||
}
|
||||
|
||||
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
||||
|
Loading…
Reference in New Issue
Block a user