Bug 238327
Summary: | [GTK] Scrollbar jumps to top when drag released outside window | ||
---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
Component: | WebKitGTK | Assignee: | Michael Catanzaro <mcatanzaro> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | alicem, bugs-noreply, cgarcia, mcatanzaro, otte |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=257039 https://bugs.webkit.org/show_bug.cgi?id=257690 https://bugs.webkit.org/show_bug.cgi?id=262804 |
||
Bug Depends on: | |||
Bug Blocks: | 210100 |
Michael Catanzaro
This is not a very serious issue, but apparently it's something I do habitually: click on the scrollbar slider, drag it around, then release the drag *outside* the window. With GTK 3, the scrollbar stops in the position where it was released (expected behavior). With GTK 4, the scrollbar jumps to the top of the window and I have to scroll back to wherever I was.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
Problem seems to be that the cursor leaving the web view gets indicated by a mouse event with coordinates (-1, -1). WebKit interprets this too literally and decides the cursor jumped up and left.
Michael Catanzaro
It's coming from webkitWebViewBaseLeave:
priv->pageProxy->handleMouseEvent(NativeWebMouseEvent({ -1, -1 }));
Michael Catanzaro
So with GTK 3, this problem is handled by webkitWebViewBaseCrossingNotifyEvent. We need to do something like that for GTK 4. But GtkEventControllerMotion is designed to make this difficult. It's not going to give us coordinates we can use, and there is no current event to get them from.
We might need to fake it somehow by starting with the coordinates from the last event before the leave event, and adjusting them to be just outside the web view's allocation. Opinions welcome.
Michael Catanzaro
Pull request: https://github.com/WebKit/WebKit/pull/14085
EWS
Committed 264582@main (c56a5e4e1e44): <https://commits.webkit.org/264582@main>
Reviewed commits have been landed. Closing PR #14085 and removing active labels.
Michael Catanzaro
This should also fix Google Maps scrolling like crazy to the northwest when dragging the mouse outside the web view.