[Fix] Webview is covered with transparent overlay when clicking inside it #8704
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Shahar Harari [email protected]
What it does
When clicking inside webviews a mousedown event is dispatched on webview node. This logic was added #8633 in order to fix #7752.
The problem is that eventually also application shell mousedown event is fired, which causes the webview to be covered by a transparent overlay:
theia/packages/plugin-ext/src/main/browser/webview/webview.ts
Lines 187 to 191 in d295e46
This transparent overlay disrupts interaction with webview UI.
The solution is to dispatch the
mousedown
event on document instead of on webview node, and by that prevent the application shell mousedown event from being fired.Fixes #8702. There can also be similar issues with other webviews.
How to test
Review checklist
Reminder for reviewers