-
-
Notifications
You must be signed in to change notification settings - Fork 575
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
Clicking an active terminal in some versions of chrome switches terminal #330
Comments
Doesn't happen on Windows7 in VirtualBox will try to install win8. Does this happen on Linux/Chrome? |
I have had it happen on chrome 60 on win8, chrome 60 on win10, but not on chromium or chrome 60 on linux. My friend also had it happen on safari on his iphone (ios 10.3). |
I've just tested it in Chrome 60 on windows 10 and it work fine. I can click on same terminal and it stay focused. And I got the same behavior in Firefox. Maybe you have some kind of extension installed in chrome, that modify the behavior. |
And just to be sure I have the same in Edge. |
Found another issue. When you created multiple terminals that where enabled all of them had cursor. Fixed that in devel branch, don't know if that's related. On codepen you will not see this because iframe is not in focus and you need to click on it first. |
The other idea is to add white border to terminal so you can see on which terminal you've clicked. Are you sure you click on the same terminal and not below the cursor. |
I think I've found the issue, one more thing can you copy/paste this snippet into console and tell me the output it should be false: (function() {
return 'ontouchstart' in window || !!window.DocumentTouch &&
document instanceof window.DocumentTouch;
})(); The fix is only for case when this return true, so if this return false I'll need to find another issue with the code. |
Potential fix is in devel branch. |
That returns true for the affected platforms I could get to right now. |
what about this one? (function() {
return (('ontouchstart' in window)
|| (navigator.MaxTouchPoints > 0)
|| (navigator.msMaxTouchPoints > 0));
})(); |
True on my chrome win8, chrome on android, and safari on iphone (all I can test right now) |
Weird for Chrome on windows, but the issue should be resolved anyway on devel branch can you test it? Here is your demo but with devel branch https://codepen.io/jcubic/pen/KvJMJx |
The change fixes jumping to a different terminal. It now unfocuses the terminal on the second click. Also for the windows, I think it is because my install things my computer has a touch screen. My friend has a touch screen for his win 10 machine, and had the same issues I had on my win8. |
The reason why it unfocus on click is that on mobile it need to toggle virtual keyboard, Maybe I can came up with better detect of mobile devices. |
I've replaced touch detection with mobile detection using user agent, it should work now the same with touch screens like or normal screen when not on mobile devices, but for iPhone/Android it will disable terminal so it can hide virtual keyboard. |
released in version 1.7.0 |
Expected behavior
I would assume that clicking an active terminal would have no effect, since it already focused, based on
To swich between terminals you can just click on terminal that you want to activate.
Actual behavior
Focus switches to another nearby terminal if present. If this is intended behavior, it does not happen in firefox. Also if it is intended, can we have some way to disable it?
Steps to reproduce
Visit https://codepen.io/anon/pen/brOQOv in chrome on Windows and click on the active terminal.
Browser and OS
Chrome 60 on Windows 8.
Doesn't seem to happen on ubuntu 16, or in firefox.
The text was updated successfully, but these errors were encountered: