lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.04k stars 667 forks source link

WebView & WebView2 Do Not Properly Respond to Arrow Key Inputs #1072

Open pinojojo opened 2 months ago

pinojojo commented 2 months ago

Describe the bug

WebView and WebView2 do not properly respond to arrow key inputs. This problem specifically arises when the WebView is situated within a Page. In contrast, when the WebView is embedded in a ui:FluentWindow (like the gallery app's MonacoWindow), the arrow key inputs are handled correctly.

It seems that there might be a discrepancy in how key input events are managed between different container types. This issue can affect navigation and user interaction within the WebView when it's placed in standard pages.

To Reproduce

Open the gallery application and navigating to the WebView example page, Try to input random texts into the provided text box. use the left or right arrow keys does not alter the cursor position or navigate through the text, indicating that the arrow keys are non-functional in this context. arrowkeyissue

Expected behavior

I would like the webview in typical navigatable Page can respond to arrow Key inputs correctly.

Screenshots

No response

OS version

Windows 11

.NET version

.Net 8.0

WPF-UI NuGet version

3.0.4.0

Additional context

No response

SecondNewtonLaw commented 2 months ago

Can confirm, happens to me as well when using WebView2 on a page on an actual UI

joe85 commented 3 weeks ago

I took experienced this.

In your page xaml add:

ScrollViewer.CanContentScroll="False"

Though I noticed it breaks my theme when I do that. At least you can use the browser.