WebView2Feedback icon indicating copy to clipboard operation
WebView2Feedback copied to clipboard

[Problem/Bug]: input field of type text and name email loses focus

Open Waltraut opened this issue 10 months ago • 55 comments

What happened?

Webview2 runtime version 134.0.3124.51 minimal webpage:

<!DOCTYPE html>
<html><body>
name email and type text loses focus
<form method="POST">
input name email, type text: <input type="text" name="email"/>
input name other than email, type text: <input type="text" name="notemail"/>

<input type="submit" value="Do something" class="dbapi_button">

</form>
	
</body></html>

click in first field will immediately lose the focus, second field works as expected. with Webview2 Version 133.x it worked for both fields.

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

134.0.3124.51

SDK Version

No response

Framework

Winforms

Operating System

Windows 11

OS Version

No response

Repro steps

please see above

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

133.0.3065.92

Waltraut avatar Mar 07 '25 17:03 Waltraut

Any word on getting a fix?

cenright avatar Mar 08 '25 01:03 cenright

On the few fields I tried -> Its related to a popup for "Saved Info". If it has data saved to popup, then problem occurs.

After the webview2 stores data ("Saved Info" popup) into to field -> it would show a popup when you click into it for the old version, for 134.0.3124.51 it seems to block on the popup when clicking on it

If I clear the fields of saved info by deleting the data path folder for webview2 then run again in 134.0.3124.51, it works again until it stores a new value when saving form / and then tries to do the popup again the next time and fails.

Image

cenright avatar Mar 08 '25 06:03 cenright

Our WSUS server approved version 134.0.3124.51 and installed it on all our workstations in our domain. I just read the following page: https://community.chocolatey.org/packages/webview2-runtime/134.0.3124.51 and I question whether this version should have been available. Was 134.0.3124.51 officially deployed by Microsoft?

jdenright avatar Mar 08 '25 17:03 jdenright

Hi @Waltraut Thanks for reaching out. We are able to reproduce this issue. We will create an internal tracking issue and will follow up on this. Thanks !

Badhri avatar Mar 10 '25 03:03 Badhri

We have created an internal tracking bug to fix this.

Badhri avatar Mar 10 '25 03:03 Badhri

@Badhri, I have this issue in my app, making it almost impossible for our users to use. The app renders a web app in a webview2 for user login. The web app has its own JS running on the input field for validations. The save info popup makes the text field lose focus. The users can only enter one character at a time before the window loses focus.

pritesha avatar Mar 10 '25 05:03 pritesha

@Badhri check attached video, is it the same bug ? Dropdown values cannot be selected. [

https://github.com/user-attachments/assets/ae39f1d2-a11a-4e86-8c2f-9313122ad74e

](url)

`

<h2>Select a Fruit:</h2>
<select name="fruits" id="fruits">
    <option value="apple">Apple</option>
    <option value="banana">Banana</option>
    <option value="orange">Orange</option>
    <option value="grape">Grape</option>
    <option value="mango">Mango</option>
</select>

<h2>Select a Car Make:</h2>
<select name="cars" id="cars">
    <option value="toyota">Toyota</option>
    <option value="honda">Honda</option>
    <option value="ford">Ford</option>
    <option value="bmw">BMW</option>
</select>
`

repo-nio avatar Mar 10 '25 06:03 repo-nio

This is critically impacting our WebView2 user base.

I'm not sure if it's clear from the posts and messages above- but for us this is a 100% blocker for all our input fields on any web form displayed to users on this version.

grahammcallister avatar Mar 10 '25 08:03 grahammcallister

How can the WebView Runtime be downgraded? We have issues with SAPGui.

Xento avatar Mar 10 '25 13:03 Xento

See here for related bugs (probably)? Our org has also logged with Microsoft directly. Unsure how to escalate correctly.

https://github.com/MicrosoftEdge/WebView2Feedback/issues/5150 https://github.com/MicrosoftEdge/WebView2Feedback/issues/5147

grahammcallister avatar Mar 10 '25 16:03 grahammcallister

Users are experiencing browser control blinking and also constant validation popup messages as they type into certain textbox fields. This has resulted in bad experience since Friday. Previous build of MS Edge was fine.

We turned off WebView2 IsGeneralAutofillEnabled as a workaround and deployed a hotfix to reduce support calls. Also tried blocking the update, but it is a bit late since it was being pushed since Friday.

lgarcia-tritier avatar Mar 10 '25 16:03 lgarcia-tritier

Is it possible to downgrade the Webview?

Xento avatar Mar 10 '25 16:03 Xento

Same issue here, multiple users experience the loss of focus when trying to enter a field.

TpRaspPi20 avatar Mar 10 '25 17:03 TpRaspPi20

How to downgrade?

azcotic avatar Mar 11 '25 01:03 azcotic

See here for related bugs (probably)? Our org has also logged with Microsoft directly. Unsure how to escalate correctly.

#5150 #5147

another one : #5148

repo-nio avatar Mar 11 '25 02:03 repo-nio

Update: We have identified the root cause and are actively working on possible fixes, validations and releasing it out to public. Will update back once we have a public release with the fix.

gourabkmsft avatar Mar 11 '25 05:03 gourabkmsft

Update: We have identified the root cause and are actively working on possible fixes, validations and releasing it out to public. Will update back once we have a public release with the fix.

@gourabkmsft can you confirm that this is linked to #5148 ?

repo-nio avatar Mar 11 '25 06:03 repo-nio

@repo-nio yes, we have confirmed this fixes #5148 as well.

gourabkmsft avatar Mar 11 '25 08:03 gourabkmsft

Is there any workaround we can apply for this in the meantime?

C-Wal avatar Mar 11 '25 09:03 C-Wal

@C-Wal

try this code(C++). In our case, it works.

auto settings4{ settings.try_query<ICoreWebView2Settings4>() } ;
if (settings4)
{
    settings4->put_IsGeneralAutofillEnabled(FALSE) ;
}

freeman-neo avatar Mar 11 '25 09:03 freeman-neo

@freeman-neo I am using C# and WPF and tried this:

webView.CoreWebView2.Profile.IsGeneralAutofillEnabled = false;

It did not fix the problem for me.

C-Wal avatar Mar 11 '25 09:03 C-Wal

@C-Wal What about using Fixed WebView2 Runtime version? This was our 2nd solution and it works, too. You can download v133 from Microsoft.

_browserExeFolder <- Fixed runtime folder(included in our setup file)

::CreateCoreWebView2EnvironmentWithOptions(LPCWSTR(_browserExeFolder), userDataFolder, options.Get(),
    Callback<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>(this, &WebView::CreateEnvironmentCompleted).Get()) ;

freeman-neo avatar Mar 11 '25 09:03 freeman-neo

As an additional data point: this issue seems to affect Outlook Classic as well, because we have the same issue as the OP with our Outlook Add-In for some users when these users have been updated to WebView2 version 134. The Add-In runs in a WebView2 panel provided by Outlook and when we click on a text box, "something" steals the focus from Outlook before returning it. We investigated that and found that the "stealing" process is a WebView2 process that runs in the context of Outlook.

lafe avatar Mar 11 '25 11:03 lafe

Facing the same issue in context of an Excel Add-in application. First field loses focus right away all the other fields work as expected. Debugging directly the events on the input field I noticed blur event is fired before click event hence focus event is never fired!

On a machine with version 133.0 the events are fired in the following order click, focus, blur

Is there any way to downgrade the Webview version to test this? @gourabkmsft Any ETA for this one it's affecting a lot of users .

majid701 avatar Mar 11 '25 13:03 majid701

Got similar messages from users that login to our system with the email / password login from Auth0. Remembered email popups do not work anymore, screen flickers while typing instead.

Ed156 avatar Mar 11 '25 14:03 Ed156

The most problematic aspect of this issue occurs when WebView2 hosts Office.js (PowerPoint) add-ins. The bug causes the focus to shift from the task pane (i.e., WebView) back to the editor (slide) area, preventing any input from being entered into an empty field on the login screen.

alexuaua avatar Mar 11 '25 19:03 alexuaua

Hey folks -- we've identified the issue and submitted a PR with a fix. A new Stable build with the fix should start rolling out on Thursday 3/13. We'll do a postmortem on this and keep this thread posted when there is a version number with the fix to share.

fabiorocha avatar Mar 11 '25 21:03 fabiorocha

Do you know what version this will be? So we can confirm when it's available on our devices.

C-Wal avatar Mar 12 '25 09:03 C-Wal

@fabiorocha A version number to identify the fix would be much appreciated here

majid701 avatar Mar 12 '25 12:03 majid701

Wnated to update on the previously linked #5148: further investigation has revealed it to be a separate issue and the fix is being pushed into v134 right now. @repo-nio

gourabkmsft avatar Mar 12 '25 15:03 gourabkmsft