diff --git a/src/widgets/ModalBar.js b/src/widgets/ModalBar.js index 293a1138381..a7e0718c5fe 100644 --- a/src/widgets/ModalBar.js +++ b/src/widgets/ModalBar.js @@ -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) { diff --git a/test/spec/QuickOpen-test.js b/test/spec/QuickOpen-test.js index d71fd63e03b..62c7bbf22b2 100644 --- a/test/spec/QuickOpen-test.js +++ b/test/spec/QuickOpen-test.js @@ -80,6 +80,7 @@ define(function (require, exports, module) { testWindow.setTimeout(function () { getSearchField().val(str); + getSearchField().trigger("input"); }, timeoutLength); } @@ -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]); } /**