Skip to content

fix(ParentedView): mouse scrolling behavior for out-of-focus windows#125

Merged
floryst merged 1 commit intoKitware:betafrom
jadh4v:fix-mouse-scrolling-out-of-focus-window
Jan 26, 2024
Merged

fix(ParentedView): mouse scrolling behavior for out-of-focus windows#125
floryst merged 1 commit intoKitware:betafrom
jadh4v:fix-mouse-scrolling-out-of-focus-window

Conversation

@jadh4v
Copy link
Copy Markdown
Collaborator

@jadh4v jadh4v commented Jan 19, 2024

Viewports on an out-of-focus window do not detect pointerenter events reliably. Add listener to wheel events for rebinding interactor with events so that wheel events can be captured by viewports that are in an out-of-focus window.

On Windows 11, recreating this issue requires a multi-window application with all windows out of focus (background). Whereas, on MacOS (tested with Sonoma and Chrome), a single out-of-focus window is sufficient to reproduce this bug.

Related vtk-js PR: Kitware/vtk-js#2992

@jadh4v
Copy link
Copy Markdown
Collaborator Author

jadh4v commented Jan 19, 2024

please review: @floryst

@jadh4v
Copy link
Copy Markdown
Collaborator Author

jadh4v commented Jan 23, 2024

@finetjul Please also take a look at this if you have time. This is related to the vtk-js PR.

Comment thread src/core/internal/ParentedView.tsx
@floryst
Copy link
Copy Markdown
Contributor

floryst commented Jan 23, 2024

Overall LGTM. It would be nice to have pointer events fire on unfocused windows, but I guess there are good perf and expected behavior reasons for it.

Out of focus windows/viewports do not detect `pointerenter` events
reliably. Add listener to `wheel` events for rebinding interactor
with events.
@jadh4v jadh4v force-pushed the fix-mouse-scrolling-out-of-focus-window branch from 8a8b7d9 to f6451eb Compare January 24, 2024 22:51
@jadh4v
Copy link
Copy Markdown
Collaborator Author

jadh4v commented Jan 26, 2024

Overall LGTM. It would be nice to have pointer events fire on unfocused windows, but I guess there are good perf and expected behavior reasons for it.

It looks like this is really a macOS problem. In windows, the events seem to trigger just fine.

@floryst floryst merged commit e95a7f3 into Kitware:beta Jan 26, 2024
@floryst
Copy link
Copy Markdown
Contributor

floryst commented Jan 26, 2024

I just realized: you will also need to update the vtk.js version, since setContainer is a new API.

@jadh4v
Copy link
Copy Markdown
Collaborator Author

jadh4v commented Jan 26, 2024

oh yes. I'll post a PR.

@jourdain
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.0.0-beta.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jourdain
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants