core (mouse): preventDefault in most cases instead of returning false, that blocks all bubbling events (fixed #3552)

This commit is contained in:
Paul Bakaus 2008-11-23 18:00:29 +00:00
parent 8e734e4a22
commit 42da86279e

View File

@ -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)) {