Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent modal closing for vim mode #1429

Merged

Conversation

Projects
None yet
2 participants
@ernestre
Copy link
Contributor

commented Apr 6, 2019

Closes #208 (Currently closed, but the bug still exists)

This fixes the issue regarding the modal closing when Escape key is pressed in vim mode. CodeMirror has an event keyHandled, which can be used to stop the Escape event from closing the modal.

https://codemirror.net/doc/manual.html#event_keyHandled

@welcome

This comment has been minimized.

Copy link

commented Apr 6, 2019

💖 Thanks for opening this pull request! 💖

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

@gschier
Copy link
Collaborator

left a comment

Nice work on this! I'm willing to merge this but I think it should be made more specific to only block the escape key and only while vim mode is activated. We still want escape to close modals when not in Vim mode 👍

@ernestre ernestre force-pushed the ernestre:prevent-modals-closing-with-vim-editor branch from 1638b53 to a1619b1 Apr 7, 2019

@ernestre

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

Is this ok?

@gschier
Copy link
Collaborator

left a comment

Awesome stuff! I like the refactor of the editor modes 😄

@gschier gschier merged commit fab8b56 into getinsomnia:develop Apr 13, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@welcome

This comment has been minimized.

Copy link

commented Apr 13, 2019

Congrats on merging your first pull request! 🎉🎉🎉 You're helping make Insomnia awesome! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.