Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE 11 "prompt to remember password" regression bug since 15.2.0 #12749

Closed
luisrudge opened this issue May 5, 2018 · 18 comments
Closed

IE 11 "prompt to remember password" regression bug since 15.2.0 #12749

luisrudge opened this issue May 5, 2018 · 18 comments

Comments

@luisrudge
Copy link

luisrudge commented May 5, 2018

Note: this issue seems solved for Edge but not for IE 11, see #12749 (comment)

This issue was already raised, but since it was closed, I'm opening a new one so we can get more traction on this.

I'm still having this issue with both IE and Edge:

Works with 15.1.0: https://codesandbox.io/s/lpvz0zy9wq
Doesn't work with 15.2.0: https://codesandbox.io/s/o9kl2jzo1q
Doesn't work with 15.6.2: https://codesandbox.io/s/38kp95wl96
Doesn't work with 16.3.1: https://codesandbox.io/s/xjpk3wr55p

In order to test this effectively, you have to follow a few steps:

Using Edge, go to Settings >> View Advanced Settings, under Privacy and Services

  • make sure you have Offer to save passwords enabled:
    image

  • make sure you don't have any passwords saved in the codesandbox.io domain:
    image

Steps to reproduce when IT WORKS (15.1.0)

  • go to the 15.1.0 sandbox
  • type a username and a password and hit submit
  • you'll see a confirmation panel about saving passwords:
    image
  • refresh the page
  • type another username and a password and hit submit
  • you'll see another confirmation panel about saving passwords:
    image
  • refresh the page
  • click on the first input
  • you'll see a list of the previously used usernames: image

Steps to reproduce when IT DOESN'T WORK (15.2.0, 15.6.2, 16.3.1)

  • remove previously saved passwords from the codesandbox.io domain:
    image
  • go to any of the non-working sandboxes (15.2.0, 15.6.2, 16.3.1
  • type a username and a password and hit submit
  • there will be no password confirmation panel
  • refresh the page
  • click on the first input
  • there will be no list of previously used usernames
@benlonsdale
Copy link

Anybody know of a workaround for this?

@nhunzaker
Copy link
Contributor

Hey @benlonsdale! If memory serves, a lot of this boils down to touching the password input's value property/attribute. At least, this definitely fixed the "eye" icon to expose the password.

This might be fixed. We made some changes to prevent premature validation FF on required inputs that might also fix this issue. Testing on 16.4.1, I can get the prompt to show up:

screen shot 2018-06-25 at 8 35 38 am

Can you take a look at my fork for 16.4.1 and confirm?
https://codesandbox.io/s/84pv0xx9n9

@luisrudge
Copy link
Author

@nhunzaker will this backported to 15.x?

@nhunzaker
Copy link
Contributor

Hey! Sorry for the delay. That is a good question. I am not sure if there was another 15.x release planned, but I can bring it up with the team.

I'll report back tomorrow!

@aweary
Copy link
Contributor

aweary commented Jun 27, 2018

At this point it seems unlikely that we'd do another 15.x release.

@luisrudge
Copy link
Author

Would you consider making an exception for this clear bug regression?

@gaearon
Copy link
Collaborator

gaearon commented Aug 2, 2018

No, we don't backport anything to old majors except critical issues. It's too risky to accidentally break havoc. Especially with 15.x our release process was very complicated because of two side-by-side codebases, and it's not worth the risk touching that again.

This bug is not special — we've had quite a few regressions like this (hopefully most of them are fixed). I'm closing since this is reported to be fixed in the latest version of React. Sorry couldn't help more.

@gaearon gaearon closed this as completed Aug 2, 2018
@luisrudge
Copy link
Author

16.4.1 works for me. Thanks!

@yiochen
Copy link

yiochen commented Aug 13, 2018

This seems working for Edge now with React 16.4.2 (and 16.4.1)
But still doesn't work for IE11.

React 15.1.0 on IE 11:
screen shot 2018-08-13 at 2 23 52 pm
React 16.4.2 on Edge:
screen shot 2018-08-13 at 2 24 59 pm
React 16.4.2 on IE 11:
screen shot 2018-08-13 at 2 24 18 pm

Code sandbox example:
https://codesandbox.io/s/886r26yr9

Code sandbox editor doesn't support IE 11. But the preview can be open in IE 11:
https://886r26yr9.codesandbox.io/

@gaearon gaearon changed the title IE 11/Edge "prompt to remember password" regression bug since 15.2.0 IE 11 "prompt to remember password" regression bug since 15.2.0 Aug 13, 2018
@gaearon gaearon reopened this Aug 13, 2018
@gaearon
Copy link
Collaborator

gaearon commented Aug 13, 2018

Reopening to track IE11 issue.

@nhunzaker
Copy link
Contributor

Quick tests indicate that setting node.defaultValue or node.setAttribute('value') results in the loss of this behavior. The next thing I want to figure out is if this matters before or after the input is attached to the page, and if there is a difference between 15 and 16 on if attributes are attached before or after adding them to the DOM.

@ValeryG
Copy link

ValeryG commented Nov 29, 2018

any resolution on this one? (or maybe workaround)?

@bastischulz
Copy link

I finally found a workaround for this.

TLDR: window.external.AutoCompleteSaveForm(form.cloneNode(true));

I do not know exactly why it works, but I believe value changes are not properly recognized on controlled components. The function mentioned above is IE-exclusive, you need a try-catch block for it, because it's always shown as undefined, even in IE.

Cloning is necessary to ensure that all values ​​are present from the beginning.

@erikrenberg
Copy link

@bastischulz Where do you put that function call in your component? (for example, how to you modify the code in the sandbox code linked to above?).

(I tested you workaround, and it works!, but I'm not sure where to put it: In my hacky test I added it to a submit-handler for the form, and also added a "ref" to the form in render() so that I have the form to call cloneNode() on. I'm not convinced this is the best way to do it.)

<form
   ref={form => {
      this.form = form;
    }} 
...

@marudhupandiyang
Copy link

marudhupandiyang commented Feb 27, 2019

@bastischulz solution works. Tested on IE11 with React 15.6.2.

@bastischulz
Copy link

@erikrenberg - We have a more complex Form, but I did something like this: https://codesandbox.io/s/yw40ny71x

@gaearon
Copy link
Collaborator

gaearon commented Mar 29, 2022

We are dropping support for IE in React 18, so this won't get a fix.
Sorry.

@gaearon gaearon closed this as completed Mar 29, 2022
@luisrudge
Copy link
Author

And I'm happy I don't have to support it anymore 😝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants