Skip to content
Permalink
Browse files

core (mouse): preventDefault in most cases instead of returning false…

…, that blocks all bubbling events (fixed #3552)
  • Loading branch information...
Paul Bakaus
Paul Bakaus committed Nov 23, 2008
1 parent 8e734e4 commit 42da86279e3606e0a5bebdce233dfe1f4dcbcc6b
Showing with 6 additions and 2 deletions.
  1. +6 −2 ui/ui.core.js
@@ -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)) {

0 comments on commit 42da862

Please sign in to comment.
You can’t perform that action at this time.