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.
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.
It's coming from webkitWebViewBaseLeave: priv->pageProxy->handleMouseEvent(NativeWebMouseEvent({ -1, -1 }));
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.
Pull request: https://github.com/WebKit/WebKit/pull/14085
Committed 264582@main (c56a5e4e1e44): <https://commits.webkit.org/264582@main> Reviewed commits have been landed. Closing PR #14085 and removing active labels.
This should also fix Google Maps scrolling like crazy to the northwest when dragging the mouse outside the web view.