From 42da86279e3606e0a5bebdce233dfe1f4dcbcc6b Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Sun, 23 Nov 2008 18:00:29 +0000 Subject: [PATCH] core (mouse): preventDefault in most cases instead of returning false, that blocks all bubbling events (fixed #3552) --- ui/ui.core.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/ui.core.js b/ui/ui.core.js index 172968bde..2d4472f5c 100644 --- a/ui/ui.core.js +++ b/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)) {