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
WebView: mouse drag does not stop when within webview region #75090
Comments
This happens for all sashes. For example, also between two window groups. |
@kieferrm I cannot reproduce, what is special? Tried both with external mouse and touchpad. |
Looks like this problem is reproducible if I try to drag edge between editor/panel and webview. TL;DR; looks like mouse events ( I can freely widen webview (mouse movement will be over editor/panel), but it is really hard to narrow webview (when during resize mouse will be over webview). VS Code version: Code - Insiders 1.36.0-insider (f291714, 2019-06-12T05:19:53.054Z) System Info
|
@bpasero: @IllusionMH is correct. I just came here to file this issue. Simply open the Release Notes in the product, and you won't be able to increase the sidebar size. It seems the webview is eating up the mouse events. I'll update the original issue steps. |
This seems to happen for what I believe are web views. Open the release notes, Markdown Preview, Browser Preview, Github Pull Request description view, etc. in an editor and attempt to resize anything around it (side bar, Terminal, other editors in split view). Here are some recordings for more context:
Version: 1.36.0-insider (user setup) |
https://gist.github.com/deepak1556/899491631e1c7e5e81c4252b6ff91163 is a simple repro without involving vscode. Dragging outside webview element shouldn't cause issues while dragging over it eats the events. |
@deepak1556 I confirm this is a bug of Chrome, you can reproduce by loading this chrome app in Chrome browser: |
Thanks @zcbenz , I did a git bisect on chromium using https://www.chromium.org/developers/bisect-builds-py and found the commit that regressed this behavior https://chromium-review.googlesource.com/c/chromium/src/+/1099183/ . I am gonna report it upstream to get the right fix moving forward. |
@mjbvz adding you to see if we can add any workaround to the |
Another idea from @joaomoreno is to draw a div when mouse-down happens so that we ensure the mouse does not go into the |
I talked with @deepak1556 about this yesterday. We can't entirely block mouse events to webviews without breaking a lot of extensions but we may be able to intercept the events and re-dispatch them into the webview |
|
Looks like we can't intercept/block click events directly on the |
I have to get going, but I also tried adding an overlay div on top of the webview to intercept events. However I haven't been able to get the re-dispatching back to the webview working yet. |
@mjbvz I like that approach as well. |
I've merged my workaround. Will continue testing today and get some testing on insiders @deepak1556 Do you think you will be able to get chromium issue fixed for electron 4 at some point, or are we waiting to upgrade electron versions? |
@mjbvz great, can you open a separate issue with verification needed (possibly across all 3 OS?) so that we get some coverage. I would like to keep this issue for the Electron fix. |
Created #76198. High complexity since it is an exploratory item and requires testing multiple extensions. Will find testers and continue testing myself as well |
@mjbvz once the fix is available, I will backport it to all version lines electron 4, 5 and 6 |
Apart from a bit of jank, the workaround works fine here (Linux). |
Looks like there are cases when resizing webviews (checked Markdown preview and GitHub Pull request description preview) leads to unexpected jumps in size (minimal size for column). Demo resize-jumps.mp4 (36.3 MB) Actual cursor position was inside the red circle from Screencast mode. Reproducible only when shrinking webview from the left border. Similar to #76198 (comment), however few times I released mouse in this moment so resulting layout was far from expectations. Also few times noticed problem described in #76198 (comment) but it looks rare. Overall workaround looks good enough on Windows. |
The issue also manifests itself when dragging a scrollbar next to a WebView. Please see mhutchie/vscode-git-graph#153 |
In VSCODE 1.36.1, "Git History" extension also has the problem that can't drag to resize the webview |
@chongchai it's problem of all webviews |
Upstream issue has not gained attention in a while, the workaround seems to be fine. Closing this issue in favor of it. |
Issue Type: Bug
-> Doesn't work, webview seems to eat up mousemove event, since it's still possible to decrease the sidebar size.
VS Code version: Code - Insiders 1.36.0-insider (c089daa, 2019-06-07T06:13:41.194Z)
OS version: Darwin x64 18.6.0
Remote OS version: Linux x64 4.18.0-1014-azure
The text was updated successfully, but these errors were encountered: