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

Don't let ESC key bubble in CodeHintList. Fixes #12799 #12802

Merged
merged 1 commit into from
Sep 29, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/editor/CodeHintList.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,14 +392,17 @@ define(function (require, exports, module) {
if (event.type === "keydown" && this.isHandlingKeyCode(event)) {
keyCode = event.keyCode;

if (event.keyCode === KeyEvent.DOM_VK_ESCAPE ||
(event.shiftKey &&
if (event.keyCode === KeyEvent.DOM_VK_ESCAPE) {
event.stopImmediatePropagation();
this.handleClose();

return false;
} else if (event.shiftKey &&
(event.keyCode === KeyEvent.DOM_VK_UP ||
event.keyCode === KeyEvent.DOM_VK_DOWN ||
event.keyCode === KeyEvent.DOM_VK_PAGE_UP ||
event.keyCode === KeyEvent.DOM_VK_PAGE_DOWN))) {
event.keyCode === KeyEvent.DOM_VK_PAGE_DOWN)) {
this.handleClose();

// Let the event bubble.
return false;
} else if (keyCode === KeyEvent.DOM_VK_UP) {
Expand Down