-
-
Notifications
You must be signed in to change notification settings - Fork 576
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
Terminal never gives up focus #359
Comments
This one works in command: setTimeout(() => {
this.disable();
$('input')[0].focus();
}, 100); Don't know why it don't work without timeout and don't know why I need to investigate why there is need for setTimeout, it would be nice if you need to use it, probably the code that make textarea in sync (fix_textarea function) it responsible for this and it refocus after you enter the command. |
It doesn't work for me, even with timeout. That only results in strange shared focus. Even with longer timeout... EDIT: Oh my mistake, I had messed with onBlur property. It works now with timeout... |
There was two bugs one that you can't call focus(false) if you have one terminal and the fix for second was to check if cmd plugin was enabled before refocus textarea and set cursor position. Can you test devel branch? |
Great! yes, focus(false) now works without timeout! (on devel branch) |
While you're here I would love to ask you if there's any elegant way to do something else I've been trying to do, but I'm new to git... is it cool to have unrelated discussion on this thread? :) |
Sure |
or maybe better to create another issue with your question so if someone will search he will find it by title. |
ok I'll do that |
the fix is in version 1.11.0 |
I am also running into the same problem. If you guys don't mind, can you explain how this can be fixed? using the cdn version 1.11.4, copied form the README |
@ahmed-shariff what exactly is the issue? And what steps do I need to do to recreate the issue? |
I am using ace-editor and the terminal in the same page. The php script is as follows:
The The terminal works nicely. But when I am trying to use the input on the top of the page, or the ace-editor, whatever I type is also grabbed by the terminal. Also the when I hit enter from within the editor, the terminal takes that and the editor does not. |
Oh, it's because you're using: onBlur: function() {
return false;
} TL;DR remove it this make terminal don't give up focus, this was fix for full screen terminal when it was added to body. When output of the terminal is smaller then the height you could click below terminal and you loose focus . I've added this to examples so it work for Full screen terminal. But it turn out that this can be done using css I need to remove that function from examples. |
That solved the problem. |
I've tried to switch focus to another text box using both terminal commands and key event handlers registered on the window, I would expect the focus to switch completely to other text box
jquery terminal always retains focus. sometimes theres a period of shared focus where a few characters entered go in both the terminal and the other text box
Maybe there's a way to do this but I've tried messing with enabled and other settings. Have read similar problems but nothing quite the same. Is there a simple fix to this? just wanted to ask before I go digging around in the code.
have tried in chrome and firefox on macos and ubuntu
edit: also just checked and even on the official demo page with the quake-like terminal, hidden terminal still grabs all key entries
The text was updated successfully, but these errors were encountered: