Skip to content

[Problem/Bug]: WPF and WebView2 - Setting Focusable property false does not prevent focusing on WebView component #5049

@dev-null-ptr

Description

@dev-null-ptr

What happened?

We need to allow users interaction with WebView component while having focus on another element.
Setting WebView2's Focusable property to false does not seem to work, clicking on WebView componet always focuses on it (GotFocus is triggered when clicking on WebView).

How can it be achieved?

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

131.0.2903.146

SDK Version

1.0.1823.32

Framework

WPF

Operating System

Windows 10

OS Version

19045.5247

Repro steps

Add two components to WPF application window - WebView2 and e.g.: textbox.
Set WebView2 component Focusable property to false.
Click on textbox - textbox is focused.
Click on WebView2 - textbox loses focus - WebView2 is focused.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtrackedWe are tracking this work internally.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions