summaryrefslogtreecommitdiff
path: root/lib/dijit/a11yclick.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-03-18 10:26:24 +0400
committerAndrew Dolgov <[email protected]>2013-03-18 10:26:26 +0400
commitf0cfe83e3725f9a3928da97a6e3085e79cb25309 (patch)
tree4b0af188defaa807c7bc6ff3a101b41c9166c463 /lib/dijit/a11yclick.js
parent9a2885da170ffd64358b99194095851a2d09c1b6 (diff)
upgrade dojo to 1.8.3 (refs #570)
Diffstat (limited to 'lib/dijit/a11yclick.js')
-rw-r--r--lib/dijit/a11yclick.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dijit/a11yclick.js b/lib/dijit/a11yclick.js
new file mode 100644
index 000000000..c5fe33c2a
--- /dev/null
+++ b/lib/dijit/a11yclick.js
@@ -0,0 +1,2 @@
+//>>built
+define("dijit/a11yclick",["dojo/on","dojo/_base/array","dojo/keys","dojo/_base/declare","dojo/has","dojo/_base/unload","dojo/_base/window"],function(on,_1,_2,_3,_4,_5,_6){var _7=null;if(_4("dom-addeventlistener")){_6.doc.addEventListener("keydown",function(_8){_7=_8.target;},true);}else{(function(){var _9=function(_a){_7=_a.srcElement;};_6.doc.attachEvent("onkeydown",_9);_5.addOnWindowUnload(function(){_6.doc.detachEvent("onkeydown",_9);});})();}function _b(e){return (e.keyCode===_2.ENTER||e.keyCode===_2.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey;};return function(_c,_d){if(/input|button/i.test(_c.nodeName)){return on(_c,"click",_d);}else{var _e=[on(_c,"keydown",function(e){if(_b(e)){_7=e.target;e.preventDefault();}}),on(_c,"keyup",function(e){if(_b(e)&&e.target==_7){_7=null;on.emit(e.target,"click",{cancelable:true,bubbles:true});}}),on(_c,"click",function(e){_d.call(this,e);})];if(_4("touch")){var _f;_e.push(on(_c,"touchend",function(e){var _10=e.target;_f=setTimeout(function(){_f=null;on.emit(_10,"click",{cancelable:true,bubbles:true});},600);}),on(_c,"click",function(e){if(_f){clearTimeout(_f);}}));}return {remove:function(){_1.forEach(_e,function(h){h.remove();});if(_f){clearTimeout(_f);_f=null;}}};}};return ret;}); \ No newline at end of file