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

Implement esc key to close pop-ups and inline widgets #1262

Merged
merged 7 commits into from
Jul 17, 2012

Conversation

jasonsanjose
Copy link
Member

Assigned to @tvoliter

  • Esc when the main editor has focus closes all inline widgets
  • Esc when an inline widget has focus closes that widget alone
  • Esc when a menu (top-level, context and code hint) is open closes the dropdown
  • Fix bug that allows typing in the editor when a menu is open

Note: I noticed that Menus and CodeHintManager share positioning logic. It makes sense to refactor this into PopUpManager in the future.

@ghost ghost assigned tvoliter Jul 16, 2012
@peterflynn
Copy link
Member

The change in focus management breaks all commands that apply to inline editors. Now they all get redirected to the main editor instead.

We could try to add a real focus manager, but that feels like scope creep for what was supposed to be a smallish story. Would it be simpler to just remove the part of this diff that tries to put focus on open menus? (Making Esc close menus too wasn't officially part of the story's requirements).

if (!event.isDefaultPrevented()) {
keyEvent.stopImmediatePropagation();

_removePopUp($popUp, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like calling the "_"-prefixed one here means we'll leak by leaving the entry in _popUps...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@jasonsanjose
Copy link
Member Author

It turns out, the ESC key stuff still work with Menus even after undoing my fix. I threw it in there since it seemed like a bug to type while the menu was open.

@jasonsanjose
Copy link
Member Author

@tvoliter or @peterflynn ... ready to review

tvoliter added a commit that referenced this pull request Jul 17, 2012
@tvoliter tvoliter merged commit 57d0b54 into master Jul 17, 2012
@redmunds
Copy link
Contributor

When working on the unit tests, I notice that the contextMenuClose event does not fire when closing via Esc key.

@redmunds
Copy link
Contributor

Ooops, github did not update the page. I'll open an issue.

cgsingh added a commit to cgsingh/brackets that referenced this pull request Feb 19, 2017
cgsingh added a commit to cgsingh/brackets that referenced this pull request Feb 21, 2017
Renames and indents

fix

modified README
cgsingh added a commit to cgsingh/brackets that referenced this pull request Feb 21, 2017
Renames and indents

fix

modified README

fixed typo in readme
cgsingh added a commit to cgsingh/brackets that referenced this pull request Feb 24, 2017
Renames and indents

fix

modified README

fixed typo in readme

Make things work

Modified README
cgsingh added a commit to cgsingh/brackets that referenced this pull request Feb 24, 2017
Renames and indents

fix

modified README

fixed typo in readme

Make things work

Modified README

Added setObject wrapper function
cgsingh added a commit to cgsingh/brackets that referenced this pull request Mar 7, 2017
Renames and indents

fix

modified README

fixed typo in readme

Make things work

Modified README

Added setObject wrapper function

changes
cgsingh added a commit to cgsingh/brackets that referenced this pull request Mar 7, 2017
Renames and indents

fix

modified README

fixed typo in readme

Make things work

Modified README

Added setObject wrapper function

changes

merge conflict
cgsingh added a commit to cgsingh/brackets that referenced this pull request Mar 7, 2017
Renames and indents

fix

modified README

fixed typo in readme

Make things work

Modified README

Added setObject wrapper function

changes

merge conflict

small fix
cgsingh added a commit to cgsingh/brackets that referenced this pull request Mar 29, 2017
Renames and indents

fix

modified README

fixed typo in readme

Make things work

Modified README

Added setObject wrapper function

changes

merge conflict

small fix

Fixed issue where the initial state of auto close tags (true) did not
reflect in the editor

statemanager mistake

clean up

Fixed error with editor not reflecting auto close initially

Modified README and StateManager

Typo in README fixed

Modified UI.js and RemoteCommanderHandler.js as requested
cgsingh added a commit to cgsingh/brackets that referenced this pull request Mar 29, 2017
Renames and indents

fix

modified README

fixed typo in readme

Make things work

Modified README

Added setObject wrapper function

changes

merge conflict

small fix

Fixed issue where the initial state of auto close tags (true) did not
reflect in the editor

statemanager mistake

clean up

Fixed error with editor not reflecting auto close initially

Modified README and StateManager

Typo in README fixed

Modified UI.js and RemoteCommanderHandler.js as requested
humphd added a commit to mozilla/brackets that referenced this pull request Mar 30, 2017
Fix adobe#1262 - Option to disable Auto-Enclosing Tags
Rajat-dhyani pushed a commit to Rajat-dhyani/brackets that referenced this pull request Apr 20, 2017
Renames and indents

fix

modified README

fixed typo in readme

Make things work

Modified README

Added setObject wrapper function

changes

merge conflict

small fix

Fixed issue where the initial state of auto close tags (true) did not
reflect in the editor

statemanager mistake

clean up

Fixed error with editor not reflecting auto close initially

Modified README and StateManager

Typo in README fixed

Modified UI.js and RemoteCommanderHandler.js as requested
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants