-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
how to do command enter and preventing enter from being sent to code editor? #144
Comments
onKeyDown={(event) => {
+ event.preventDefault();
console.log(">>>>");
}} @TheBuilderJR https://codesandbox.io/embed/https-github-com-uiwjs-react-textarea-code-editor-issues-144-4yvoij?fontsize=14&hidenavigation=1&theme=dark |
I was looking at this package, and got the same issue. Linked codesandbox doesn't work for me (using Firefox/Linux (Pop!)) |
react-textarea-code-editor/src/index.tsx Lines 95 to 99 in dedfb99
onKeyDown={(event) => {
+ event.preventDefault();
console.log(">>>>");
+ return true
}} @aleda145 Maybe it can solve your problem |
It doesn't work :/, same problem. Also tried adding The following textArea works as expected for me <textarea
onKeyDown={(event) => {
event.preventDefault();
}}
></textarea> Let me know if there anything you want from me to debug this! Great package, I still use it! ⭐ I wanted it to run a SQL query on shift+Enter and not create a new line. But changed to ctrl+space instead, works just as well 😄 ! |
Running into the same issue -- the event cannot be stopped. Any update here? |
Same issue.Any update? |
Maybe I don't understand what it means, haven't solved the problem yet? |
tried this to no avail
The text was updated successfully, but these errors were encountered: