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

Commit d79cc5e

Browse files
Fix review issues
1 parent c252576 commit d79cc5e

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

src/widgets/Dialogs.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,11 @@ define(function (require, exports, module) {
133133
} else if (e.which === KeyEvent.DOM_VK_ESCAPE) {
134134
buttonId = DIALOG_BTN_CANCEL;
135135
} else if (e.which === KeyEvent.DOM_VK_RETURN && !inTextArea) { // enter key in single-line text input still dismisses
136-
// Click focused button or primary if no focus
137-
if ($focusedElement.length !== 0) {
138-
$focusedElement.click();
139-
} else {
140-
$primaryBtn.click();
141-
}
136+
// Click primary
137+
$primaryBtn.click();
142138
} else if (e.which === KeyEvent.DOM_VK_SPACE) {
143139
// Space bar on focused button or link
144-
if ($focusedElement.length !== 0) {
145-
$focusedElement.click();
146-
}
140+
$focusedElement.click();
147141
} else if (brackets.platform === "mac") {
148142
// CMD+D Don't Save
149143
if (e.metaKey && (which === "D")) {

0 commit comments

Comments
 (0)