-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Various keys escape the terminal #136
Labels
bug
Something isn't working
Comments
Protowalker
added a commit
to Protowalker/endbasic
that referenced
this issue
Dec 3, 2021
Protowalker
added a commit
to Protowalker/endbasic
that referenced
this issue
Dec 4, 2021
This reverts commit 93e3bff.
Protowalker
added a commit
to Protowalker/endbasic
that referenced
this issue
Dec 4, 2021
Similarly, turning on Caret browsing, or simply pressing the / key on Firefox cause the browser to interpret key presses that it should not be seeing. The root cause of the problem seems to be the same as the one behind the Tab key mishandling. |
jmmv
changed the title
Tab key causes the terminal to lose focus on the web
Various keys escape the terminal
Dec 8, 2021
jmmv
added a commit
that referenced
this issue
Dec 8, 2021
There are a bunch of key presses that should be recognized by EndBASIC but that are also recognized by the browser. Some include the Tab key, the arrow keys (when "caret browsing" is enabled), and the slash key in Firefox. Before, pressing any of these keys would cause the browser to also perform their default action, which meant that the REPL would misbehave by losing focus or triggering links. With this change, we prevent the events from propagating to the browser once we have handled them so that this problem doesn't surface. This change is inspired by the fix submitted by @Protowalker in #140. Fixes #136.
jmmv
added a commit
that referenced
this issue
Dec 8, 2021
There are a bunch of key presses that should be recognized by EndBASIC but that are also recognized by the browser. Some include the Tab key, the arrow keys (when "caret browsing" is enabled), and the slash key in Firefox. Before, pressing any of these keys would cause the browser to also perform their default action, which meant that the REPL would misbehave by losing focus or triggering links. With this change, we prevent the events from propagating to the browser once we have handled them so that this problem doesn't surface. This change is inspired by the fix submitted by @Protowalker in #140. Fixes #136.
jmmv
added a commit
that referenced
this issue
Dec 8, 2021
There are a bunch of key presses that should be recognized by EndBASIC but that are also recognized by the browser. Some include the Tab key, the arrow keys (when "caret browsing" is enabled), and the slash key in Firefox. Before, pressing any of these keys would cause the browser to also perform their default action, which meant that the REPL would misbehave by losing focus or triggering links. With this change, we prevent the events from propagating to the browser once we have handled them so that this problem doesn't surface. This change is inspired by the fix submitted by @Protowalker in #140. Fixes #136.
jmmv
added a commit
that referenced
this issue
Dec 9, 2021
There are a bunch of key presses that should be recognized by EndBASIC but that are also recognized by the browser. Some include the Tab key, the arrow keys (when "caret browsing" is enabled), and the slash key in Firefox. Before, pressing any of these keys would cause the browser to also perform their default action, which meant that the REPL would misbehave by losing focus or triggering links. With this change, we prevent the events from propagating to the browser once we have handled them so that this problem doesn't surface. Manually tested this on an iPad and on an Android emulator and there don't seem to be regressions with the previous behavior. This change is inspired by the fix submitted by @Protowalker in #140. Fixes #136.
jmmv
added a commit
that referenced
this issue
Dec 9, 2021
There are a bunch of key presses that should be recognized by EndBASIC but that are also recognized by the browser. Some include the Tab key, the arrow keys (when "caret browsing" is enabled), and the slash key in Firefox. Before, pressing any of these keys would cause the browser to also perform their default action, which meant that the REPL would misbehave by losing focus or triggering links. With this change, we prevent the events from propagating to the browser once we have handled them so that this problem doesn't surface. Manually tested this on an iPad and on an Android emulator and there don't seem to be regressions with the previous behavior. This change is inspired by the fix submitted by @Protowalker in #140. Fixes #136.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pressing the Tab key when inside the web interface causes the terminal to lose focus, as the input focus moves to the next element in the DOM. This is annoying when within the editor because Tab can be used for indentation.
I tried a simple fix to call
terminal.focus()
on key up/down events but that did not fix the problem, so filing this bug instead to track this issue.The text was updated successfully, but these errors were encountered: