[Pkg-javascript-commits] [dojo] 14/58: Fix problem where native controls don't respond for 1000ms after clicking control with dojoClick=true. Thanks to reiprecht for the fix. Fixes #18362.
David Prévot
taffit at moszumanska.debian.org
Thu Mar 24 04:28:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.10.5
in repository dojo.
commit a29142173815c561a8963954b5c7f0d2c45b1b59
Author: Bill Keese <bill at dojotoolkit.org>
Date: Thu May 7 07:49:07 2015 +0900
Fix problem where native controls don't respond for 1000ms
after clicking control with dojoClick=true. Thanks to reiprecht for the fix.
Fixes #18362.
(cherry picked from commit 98d78d464dfcce4411f04f9f398f8bfc8580f544)
---
tests/functional/support/touch_dojoclick.html | 47 +++++++++++++++++++++++++++
touch.js | 2 +-
2 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/tests/functional/support/touch_dojoclick.html b/tests/functional/support/touch_dojoclick.html
new file mode 100644
index 0000000..4b30c75
--- /dev/null
+++ b/tests/functional/support/touch_dojoclick.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>test dojo/touch dojoClick property</title>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <script src="../../../dojo.js" data-dojo-config="async: true, isDebug: true"></script>
+ <script>
+ var ready = false;
+ // this, along with setting dojoClick, triggers the bug
+ require(["dojo/touch", "dojo/domReady!"], function(){
+ ready = true;
+ });
+ </script>
+ <style>
+ .button {
+ background: #ccc;
+ padding: 5px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Test dojo/touch's dojoClick property</h1>
+ <span id="dojoClickBtn" class="button">dojoClick=true</span>
+ <script>
+ dojoClickBtn.dojoClick = true;
+ dojoClickBtn.onclick = function(){
+ dojoClicks.value++;
+ };
+ </script>
+ clicks: <input id="dojoClicks" value="0" autocomplete="off">
+ <br><br>
+
+ <span id="nativeClickBtn" class="button">dojoClick=false</span>
+ <script>
+ nativeClickBtn.onclick = function(){
+ nativeClicks.value++;
+ };
+ </script>
+ clicks: <input id="nativeClicks" value="0" autocomplete="off">
+ <br><br>
+ </body>
+</html>
diff --git a/touch.js b/touch.js
index 9174a63..b219c7a 100644
--- a/touch.js
+++ b/touch.js
@@ -187,7 +187,7 @@ function(dojo, aspect, dom, domClass, lang, on, has, mouse, domReady, win){
// sent shortly after ours, similar to what is done in dualEvent.
// The INPUT.dijitOffScreen test is for offscreen inputs used in dijit/form/Button, on which
// we call click() explicitly, we don't want to stop this event.
- if(!e._dojo_click &&
+ if(clickTracker && !e._dojo_click &&
(new Date()).getTime() <= clickTime + 1000 &&
!(e.target.tagName == "INPUT" && domClass.contains(e.target, "dijitOffScreen"))){
e.stopPropagation();
--
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