-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Description
When a WebView2 control is contained within a <ScrollViewer> control, input text boxes displayed in the WebView2 no longer respond correctly to arrow, Home and End keys
Version
SDK: Mircorosft.Web.WebView2 1.0.1054.31
Runtime: Microsoft Edge WebView2 Runtime 96.0.1054.62
Framework: WPF
.NET Framework: 4.7.2
OS: Win10
Repro Steps
Create a WPF Windows App with one window containing a DockPanel, ScrollViewer, and WebView2:
<Window x:Class="WpfAppBrowser.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfAppBrowser"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
mc:Ignorable="d"
Title="MainWindow"
Height="450"
Width="800"
>
<DockPanel>
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<wv2:WebView2 Name="webView"
Source="https://www.bing.com"
/>
</ScrollViewer>
</DockPanel>
</Window>
Once bing.com has loaded, enter some text in the Bing search text input field.
Try to move the cursor within the text input using left, right arrow keys, and Home and End keys.
Expected behavior: Text input cursor moves according to the keys pressed.
Actual behavior: The cursor does not move. It remains at the end of the text.