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 default behaviour on key press #4

Open
nikolayemrikh opened this issue Jul 9, 2018 · 1 comment
Open

Prevent default behaviour on key press #4

nikolayemrikh opened this issue Jul 9, 2018 · 1 comment

Comments

@nikolayemrikh
Copy link

Hello, is there a way to prevent default behaviour on key press? I'm trying to use your lib to build a javascript in-browser console. Currently i've stuck on problem with impossibility of not append a new line character on "run" code. (not insert \n if user pressed Enter)

@orbitbot
Copy link
Owner

orbitbot commented Jul 9, 2018

It should be possible to achieve if you overwrite the enter keypress on the keys field of your misbehave instance, see https://github.com/orbitbot/misbehave/blob/master/editable.js#L53 . Didn't try this though

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

No branches or pull requests

2 participants