-
Notifications
You must be signed in to change notification settings - Fork 278
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
[Bug] what's happening when we alt tab to another window and give input in that new window and come back to the browser? #733
Comments
This issue is quite strange... I've tried in incognito, it's also happening, I've also tried in Edge, which is a browser I almost never use, same with firefox, so I'm confident I don't have any extra extensions for these. I've just noticed that if you come back to the cornerstone3d app by pressing alt tab, the issue does not occur, it seems to occur if you click back in the browser that has the cornerstone app. I've recorded another demo: the first time, I draw a line, then I alt tab, I scroll in the new window (according to my latest attempt that's not even needed), I click in the cornerstone window, and then I try to draw a line but I can't do anything anymore. Are you able to reproduce my issue if you have 2 windows side by side, 1 with a cornerstone app and one with another browser window or w/e, draw a line in cornerstone, then alt tab, scroll in that new window and then click back in the cornerstone window and try to render another line, for me that does not work. thanks for your time! |
@shikamu I'm also able to reproduce this in our app (we've two side-by-side stack viewers, and when alt-tabbing in and out the zoom/pan tools will stop working. scrolling through the other images does continue to work however). Initially we assumed it was a bug on our end...but seems like if it is it's present in the examples too. I'll let you know if I find any work(hack)arounds in the meantime Edit: It's worth noting that the tools will sometimes kick back on if i alt-tab out and back in again. @sedghi is there some cornerstone lib debug-mode or other options i can enable to maybe help try and identify the issue? |
#317 Seems like a duplicate w/ a known fix(?) Any chance the cornerstone team could merge a similar change as the hack mentioned? Also i've a consistent repro now; when i click in it works fine. Alt-tab in it's broken. Edit: this isn't really a full "repro" but the issue above does seem to be the root-cause i.e. if I keyup/down the alt (or any key for that matter) key after it's stuck it works again. |
@sedghi any thought ? |
I had the same issue and found that when you alt-tab to another window, then go back to the cornerstone tab and click (either left or right click), the mouse click event is triggered with the "ALT" key modifier on, even if you are no longer pressing the ALT key. In this situation the tool is not working anymore because the mouse click event does not match the initial mouse binging that is only mouse button, not button + ALT. The current active tool is not detected because of this. I also found (similar to @HireGuerard) that if you press the ALT key, the tool works again, likely becase the ALT key modifier in the mouse click event is cleared when you release the ALT key. A temporary workaround that works for my case is to add two bindings for the tool, one with the mouse button, and another with the mouse button plus the modifier key ALT.
Please note this is a workaround and might not work for you if you use the ALT + click event to do someting else in your application. |
…s hidden Fixes CS3D issue cornerstonejs#733.
Hello @diaztula, @shikamu and @HireGuerard, at your convenience please have a look at PR #759 and provide any pertinent feedback. Thanks so much! |
@jbocce thanks for the fix! I haven't tried the result of your PR but from what you describe in it, it seems to be spot on! |
Hello @jbocce, thanks for taking care of fixing this, seems to be a solution! |
Describe the Bug
I can use all sort of tools (pan, zoom, all the ROI tools) and then if I alt tab to another window and perform some actions in that new window (use mouse wheel for instance) and then come back to my browser with my cornerstone3d app, then I can't pan or use any of the ROI tools anymore
Steps to Reproduce
The following gif showcases just that:
what's interesting is that if you move switch to another window by clicking in the window (let's say you had the browser and visual studio side by side) and you just click in visual studio, scroll using the mouse wheel, and then come back to the browser, everything is working. The problem only occurs if we are using the alt+tab combination.
The current behavior
something seems to be happening when we alt tab out of the browser and perform some input. The bug does not seem to occur if we simply alt tab, do nothing, and come back to the browser.
The expected behavior
When I alt tab to another app and then come back to the browser, I expect to be able to continue using all the cornerstone tools on the image that's rendered.
OS
Windows 11
Node version
16.14.2
Browser
chrome 115.0.5790.171 (Official Build) (64-bit), firefox 116.0.2 (64-bit)
The text was updated successfully, but these errors were encountered: