Skip to content
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

[Fix] Webview is covered with transparent overlay when clicking inside it #8704

Merged
merged 1 commit into from
Nov 4, 2020

Conversation

shahar-h
Copy link
Contributor

@shahar-h shahar-h commented Nov 3, 2020

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:

this.toDispose.push(this.mouseTracker.onMousedown(() => {
if (this.element && this.element.style.display !== 'none') {
this.transparentOverlay.style.display = 'block';
}
}));

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

@vince-fugnitto vince-fugnitto added bug bugs found in the application webviews issues related to webviews labels Nov 3, 2020
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shahar-h thank you for taking care of the issue 👍

I verified the pull-request by:

@shahar-h
Copy link
Contributor Author

shahar-h commented Nov 3, 2020

@vince-fugnitto Some tests are failing, not sure if it's related to me:
image

@vince-fugnitto
Copy link
Member

@vince-fugnitto Some tests are failing, not sure if it's related to me:
image

They're not :) #8681

@shahar-h
Copy link
Contributor Author

shahar-h commented Nov 3, 2020

@vince-fugnitto Can you please retrigger the build?

@vince-fugnitto
Copy link
Member

@vince-fugnitto Can you please retrigger the build?

Passed :)

@shahar-h
Copy link
Contributor Author

shahar-h commented Nov 3, 2020

Thanks @vince-fugnitto :)

@vince-fugnitto
Copy link
Member

Thanks @vince-fugnitto :)

I'll merge tomorrow if there are no objections 👍

@vince-fugnitto vince-fugnitto merged commit fd0a8ce into eclipse-theia:master Nov 4, 2020
@shahar-h shahar-h deleted the transparent-div-fix branch November 4, 2020 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application webviews issues related to webviews
Projects
None yet
2 participants