Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10922 from adobe/pflynn/quickopen-unittest-fix
Browse files Browse the repository at this point in the history
Fix failing QuickOpen unit tests.
  • Loading branch information
rroshan1 committed Apr 17, 2015
2 parents 9dfbebe + 053f7c9 commit 2fbd9d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/widgets/ModalBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ define(function (require, exports, module) {
};

/**
* If autoClose is set, handles the RETURN/ESC keys in the input field.
* If autoClose is set, close the bar when Escape is pressed
*/
ModalBar.prototype._handleKeydown = function (e) {
if (e.keyCode === KeyEvent.DOM_VK_ESCAPE) {
Expand Down
3 changes: 2 additions & 1 deletion test/spec/QuickOpen-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ define(function (require, exports, module) {

testWindow.setTimeout(function () {
getSearchField().val(str);
getSearchField().trigger("input");
}, timeoutLength);
}

Expand All @@ -88,7 +89,7 @@ define(function (require, exports, module) {

// Using keyup here because of inside knowledge of how the events are processed
// on the QuickOpen input.
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_RETURN, "keyup", getSearchField()[0]);
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_RETURN, "keydown", getSearchField()[0]);
}

/**
Expand Down

0 comments on commit 2fbd9d3

Please sign in to comment.