MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Find toolbar does not always update position/visibility in WPF application
Open
@peiche-ms is already working on this.
Since Dec 13, 2023.
bug
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
The find toolbar does not always update its position/visibility when used in a WPF application:
- When the WebView2 UIElement is removed from the visual tree (e.g. switching tabs) the find toolbar remains open.
- When moving the WPF window, the find toolbar remains stationary. However, it does update correctly when resizing the window.
Version
SDK: 1.0.961.33
Runtime: 93.0.961.38
Framework: WPF (.NET Framework 4.8)
OS: Win10
Repro Steps
- Create a WPF window containing a WebView2 inside a TabControl with multiple tabs.
- Navigate to a website and perform a find (CTRL-F).
- Move the window by dragging the titlebar. The find toolbar should move accordingly but remains stationary.
- Select another tab. The find toolbar should disappear but remains visible.
<Window x:Class="WebView2Test.BrowserWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WebView2Test"
xmlns:wpf="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
Title="BrowserWindow" Height="450" Width="800">
<Grid>
<TabControl Margin="20">
<TabItem Header="First">
<wpf:WebView2 Source="https://github.com/" />
</TabItem>
<TabItem Header="Second" />
</TabControl>
</Grid>
</Window>
Screenshots
https://user-images.githubusercontent.com/90454870/133047772-01de37db-37ac-4c3e-ac3c-525d7e17733e.mp4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.