WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 238327
[GTK] Scrollbar jumps to top when drag released outside window
https://bugs.webkit.org/show_bug.cgi?id=238327
Summary
[GTK] Scrollbar jumps to top when drag released outside window
Michael Catanzaro
Reported
2022-03-24 08:54:07 PDT
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
Comment 1
2023-05-18 13:48:52 PDT
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
Comment 2
2023-05-18 14:03:05 PDT
It's coming from webkitWebViewBaseLeave: priv->pageProxy->handleMouseEvent(NativeWebMouseEvent({ -1, -1 }));
Michael Catanzaro
Comment 3
2023-05-18 14:26:44 PDT
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
Comment 4
2023-05-19 10:31:25 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/14085
EWS
Comment 5
2023-05-26 08:12:42 PDT
Committed
264582@main
(c56a5e4e1e44): <
https://commits.webkit.org/264582@main
> Reviewed commits have been landed. Closing PR #14085 and removing active labels.
Michael Catanzaro
Comment 6
2023-05-28 05:35:21 PDT
This should also fix Google Maps scrolling like crazy to the northwest when dragging the mouse outside the web view.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug