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 issue where an originally-collapsed WebView2 can't be interacted with #6761

Merged
merged 10 commits into from
Mar 3, 2022

Conversation

krschau
Copy link
Contributor

@krschau krschau commented Feb 23, 2022

The main fix here is to add a Grid as Content for the WebView2. This allows WUX hit testing code to find the WebView2, but doesn't get in its way. The size of the Grid is kept in sync with the WebView2 control.

Description

Other changes are:

  • In CheckAndUpdateWebViewPosition(), we were updating the CoreWebView2 Controller's position/size every time. Changed that to only when something has changed.
  • Removed unnecessary Wait.ForIdle()s, removing unnecessary Ignore tags, changing "RTB" header to "Focus"
  • Pulled code to remove the WebView2 that tests start with into its own RemoveExistingWebViewControl() method

Motivation and Context

Fixes #6256

How Has This Been Tested?

Added two tests, HiddenThenVisibleTest and ParentHiddenThenVisibleTest. These tests can also be executed manually.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Feb 23, 2022
@krschau
Copy link
Contributor Author

krschau commented Feb 23, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@krschau
Copy link
Contributor Author

krschau commented Feb 23, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@DmitriyKomin DmitriyKomin left a comment

Choose a reason for hiding this comment

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

🕐

@krschau
Copy link
Contributor Author

krschau commented Feb 24, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@krschau
Copy link
Contributor Author

krschau commented Feb 25, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

dev/WebView2/WebView2.cpp Outdated Show resolved Hide resolved
dev/WebView2/WebView2.cpp Outdated Show resolved Hide resolved
@krschau
Copy link
Contributor Author

krschau commented Mar 1, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@krschau krschau requested a review from codendone March 1, 2022 23:44
Copy link
Contributor

@codendone codendone left a comment

Choose a reason for hiding this comment

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

:shipit:

@krschau krschau dismissed DmitriyKomin’s stale review March 3, 2022 21:51

Comments were addressed

@krschau krschau merged commit 397647e into main Mar 3, 2022
@krschau krschau deleted the user/krschau/hiddn-wv branch March 3, 2022 21:53
@StephenLPeters StephenLPeters added area-WebView team-Rendering Issue for the Rendering team and removed needs-triage Issue needs to be triaged by the area owners labels Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-WebView team-Rendering Issue for the Rendering team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to interact with initially hidden WebView2 on UWP
4 participants