MicrosoftEdge / WebView2Feedback

Feedback and discussions about Microsoft Edge WebView2
https://aka.ms/webview2
453 stars 55 forks source link

Element in WebView would lose focus when cursor moves out WebView area #3593

Open alengYuan opened 1 year ago

alengYuan commented 1 year ago

Description Elements in WebView would lose focus when cursor moves out WebView area, but in Edge, it would not happen:

WinUI3_WebView2

Edge

In most cases, this issue would not be important, but while using ::-webkit-scrollbar in CSS to custom the style of scrollbar in web page, this issue would be unbearable because it would affect the normal use of scrollbar.

Version SDK: Microsoft.WindowsAppSDK 1.3.230602002 Runtime: 114.0.1823.51 Framework: WinUI 3 OS: Windows 11 Pro 22621.1848

Regression Was this working before but has regressed? no

Repro Steps

  1. Create one empty project with WebView 2 through Template Studio;
  2. Create one local HTML file to be mapped, or just open codepen.io;
  3. Input the code from the screenshot as content;
  4. Operate as shown in the screenshot.

Expected behavior: second screenshot Actual behavior: first screenshot

alengYuan commented 1 year ago

In most cases, this issue would not be important, but while using ::-webkit-scrollbar in CSS to custom the style of scrollbar in web page, this issue would be unbearable because it would affect the normal use of scrollbar.

with_css

without_css