Skip to content

Commit

Permalink
Workaround hang in focus_mouse.html test on IE10
Browse files Browse the repository at this point in the history
triggered by d26af75.

Starting with that change and only occuring with certain timing,
the onload event on initRobot()'s iframe (created from dojo/robotx.js)
never fires, even though the test_focusWidget.html page has finished
loading and initializing.

Strangely, this problem only seems to happen on tests/_base/robot/focus_mouse.html,
which is a deprecated test superceded by tests/focus.html.  So for now I just removed
the Editor from the test_focusWidget.html.  If we start to see more serious problems,
will need to make a bigger fix, perhaps rolling back
d26af75.

Refs #18715.
  • Loading branch information
wkeese committed Oct 5, 2015
1 parent ad38793 commit ea34005
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
33 changes: 1 addition & 32 deletions tests/_base/robot/focus_mouse.html
Expand Up @@ -32,7 +32,7 @@
doh.register("Dijit focus manager tests", [

function setUp(){
dojo.forEach(["form", "fieldset1", "fieldset2", "select", "editor", "spinner"], function(id){
dojo.forEach(["form", "fieldset1", "fieldset2", "select", "spinner"], function(id){
var w = dijit.byId(id);

// old API is to connect to onFocus/onBlur (remove in 2.0)
Expand Down Expand Up @@ -119,37 +119,6 @@
dojo.disconnect(handle);
}
},
{
name: "focus editor",
timeout: 4000,
setUp: function(){
resetEvents();
},
runTest: function(){
var d = new doh.Deferred();

dijit.byId("editor").focus();

doh.robot.sequence(d.getTestCallback(function(){
// The focus stack should show the Editor plus all parent widgets
var stack = dojo.global.dijit._activeStack;
doh.is("form, editor", stack.join(", "), "editor stack");

// _onFocus()/_onBlur was called appropriately
doh.f(focusEvents["form"], "form was already focused, no duplicate event");
doh.f(blurEvents["form"], "form wasn't blurred");
doh.t(blurEvents["fieldset1"], "fieldset no longer focused");
doh.t(focusEvents["editor"], "editor focused");

doh.f(focusedWatchLog["form"], "form watch callback (no new notification)");
doh.is("blurred", focusedWatchLog["fieldset1"], "fieldset watch callback, no longer focused");
doh.is("blurred", focusedWatchLog["select"], "select watch callback, no longer focused");
doh.is("focused", focusedWatchLog["editor"], "editor watch callback");
}), 500);

return d;
}
},

// clicking spinner buttons should activate the spinner, even
// though there's no actual DOM focus event
Expand Down
4 changes: 0 additions & 4 deletions tests/_base/test_focusWidget.html
Expand Up @@ -27,7 +27,6 @@
dojo.require("dijit.PopupMenuItem");

dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.Editor");

dojo.require("dijit._base.focus");

Expand Down Expand Up @@ -123,9 +122,6 @@ <h3>Widget Focus Test</h3>
<label for="plain">a plain input:</label>
<input id=plain value=plain/>
</fieldset>
<div id=editor data-dojo-type="dijit/Editor" >
Hello world, this is an <i>editor</i>
</div>
<br>
<label>another fieldset ContentPane:</label><br>
<fieldset id=fieldset2 data-dojo-type="dijit/layout/ContentPane">
Expand Down

0 comments on commit ea34005

Please sign in to comment.