Skip to content

Commit

Permalink
Fixes #15640. No need for a fake click event with IE9. Added automate…
Browse files Browse the repository at this point in the history
…d test.
  • Loading branch information
Douglas Hays committed Jul 10, 2012
1 parent e6990b4 commit f0db9e2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
26 changes: 24 additions & 2 deletions tests/robot/typematic.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
robot.sequence(d.getTestCallback(function(){
// allow off by 1
doh.t(v=="aaaaaaaaa"||v=="aaaaaaaaaa"||v=="aaaaaaaaaaa", "a letters typed " + v);
}), 100);
}), 500);

return d;
}
Expand All @@ -67,7 +67,29 @@
robot.sequence(d.getTestCallback(function(){
// allow off by 1
doh.t(v=="bbbbbb"||v=="bbbbbbb"||v=="bbbbbbbb", "b letters typed " + v);
}), 100);
}), 500);

return d;
}
},
{
name: "double click",
timeout: 5000,
runTest: function(){
var
d = new doh.Deferred(),
input = dom.byId("typematicInput");
input.value = "";

robot.mouseMoveAt("typematicButton", 500, 1);
robot.mousePress({left: true}, 500);
robot.mouseRelease({left: true}, 100);
robot.mousePress({left: true}, 100);
robot.mouseRelease({left: true}, 100);

robot.sequence(d.getTestCallback(function(){
doh.is("bb", input.value, "b letters typed " + input.value);
}), 500);

return d;
}
Expand Down
2 changes: 1 addition & 1 deletion typematic.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ var typematic = (dijit.typematic = {
})),
on(node, "dblclick", lang.hitch(this, function(evt){
evt.preventDefault();
if(has("ie")){
if(has("ie") < 9){
typematic.trigger(evt, _this, node, callback, node, subsequentDelay, initialDelay, minDelay);
setTimeout(lang.hitch(this, typematic.stop), 50);
}
Expand Down

0 comments on commit f0db9e2

Please sign in to comment.