[Pkg-javascript-commits] [dojo] 31/88: Prevent text selection while dragging on desktop, fixes #16328 on 1.8/ branch !strict. But continue to *not* call preventDefault() on mobile because it will break things completely, refs #15838.
David Prévot
taffit at moszumanska.debian.org
Thu Aug 21 17:39:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.8.5
in repository dojo.
commit 1aea4b1b2e5193f135ba19d0a3756766c9fc3036
Author: Bill Keese <bill at dojotoolkit.org>
Date: Tue Nov 13 12:06:22 2012 +0000
Prevent text selection while dragging on desktop, fixes #16328 on 1.8/ branch !strict. But continue to *not* call preventDefault() on mobile because it will break things completely, refs #15838.
git-svn-id: http://svn.dojotoolkit.org/src/branches/1.8/dojo@29940 560b804f-0ae3-0310-86f3-f6aa0a117693
---
dnd/Selector.js | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dnd/Selector.js b/dnd/Selector.js
index 747150f..f766453 100644
--- a/dnd/Selector.js
+++ b/dnd/Selector.js
@@ -191,12 +191,10 @@ var Selector = declare("dojo.dnd.Selector", Container, {
if(!this.singular && !dnd.getCopyKeyState(e) && !e.shiftKey && (this.current.id in this.selection)){
this.simpleSelection = true;
if(mouse.isLeft(e)){
- // accept the left button and stop the event
- // for IE we don't stop event when multiple buttons are pressed
- // TODO: remove this if() completely for 2.0, because event.stop() is useless and dangerous:
- // on mobile, it prevents a click event, and also prevents scroll (see #15838). Of course,
- // drag-scroll should be disabled while dragging, and that is handled by Source::onMouseMove(),
- // but Selector.js itself shouldn't interfere with scroll.
+ // Accept the left button and stop the event. Stopping the event prevents text selection while
+ // dragging. However, don't stop the event on mobile because that prevents a click event,
+ // and also prevents scroll (see #15838).
+ // For IE we don't stop event when multiple buttons are pressed.
event.stop(e);
}
return;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list