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

ernestre
Copy link
Contributor

@ernestre ernestre 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
Copy link

welcome bot 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.

Copy link
Contributor

@gschier gschier left a comment

Choose a reason for hiding this comment

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

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 prevent-modals-closing-with-vim-editor branch from 1638b53 to a1619b1 Compare April 7, 2019 15:55
@ernestre
Copy link
Contributor Author

ernestre commented Apr 8, 2019

Is this ok?

Copy link
Contributor

@gschier gschier left a comment

Choose a reason for hiding this comment

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

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

@gschier gschier merged commit fab8b56 into Kong:develop Apr 13, 2019
@welcome
Copy link

welcome bot commented Apr 13, 2019

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

@guyzmo
Copy link

guyzmo commented Oct 9, 2019

Thank you ♥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Esc in environment editor with Vim mode not working
3 participants