aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.core.js
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-11-23 18:00:29 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-11-23 18:00:29 +0000
commit42da86279e3606e0a5bebdce233dfe1f4dcbcc6b (patch)
treedef5dfb970eea1174120a98017b8184fc42f5cb5 /ui/ui.core.js
parent8e734e4a221d6ddb6705d5bb485271cd93cd0dfd (diff)
downloadjquery-ui-42da86279e3606e0a5bebdce233dfe1f4dcbcc6b.tar.gz
jquery-ui-42da86279e3606e0a5bebdce233dfe1f4dcbcc6b.zip
core (mouse): preventDefault in most cases instead of returning false, that blocks all bubbling events (fixed #3552)
Diffstat (limited to 'ui/ui.core.js')
-rw-r--r--ui/ui.core.js8
1 files 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)) {