Problem/Motivation

The module shows 3 icons for a given field

In the attachments I add some screenshots. Console logs are from the password.js file, to which I added such code:

console.log(context);
console.log($(".pwd-see :password", context));
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bronisMateusz created an issue. See original summary.

bronismateusz’s picture

Status: Active » Needs review
StatusFileSize
new2.58 KB

I wrote a patch that solves this problem. I tested it and it seems to do the job, even when there are several password type fields in a given form.

bronismateusz’s picture

bronismateusz’s picture

I fixed this patch because the previous one was based on version 6.0.x, and this one is for 6.0.0

gaurav-mathur’s picture

StatusFileSize
new12.98 KB
new7.5 KB

It works fine without applying any patch with view password version 6.0.0
Refer to the screenshots

anacolautti’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hi! I also cannot reproduce the issue. I'm marking this as "maintainer needs more info" for now.
Thank you for your work.

gabbysalts’s picture

StatusFileSize
new8.59 KB

For me it happens more than 3 times, and only when I go to any other URL and then use the browser's back button to navigate back to the page with the view password icon. I'm using windows 10 and it happens with chrome and edge, but not firefox (all are on the latest versions).

anacolautti’s picture

Thank you @gabbysalts. Does this patch fix the issue for you?

gabbysalts’s picture

@anacolautti I am using a off the shelf product for a large organisation, so I've got some processes I need to follow before I can apply the patch unfortunately. I'll update you if I get any progress in the coming weeks.

stefdewa’s picture

Having the same problem and the patch in #4 fixed it for me.

For me, the problem only happens in the backend. I'm using Drupal 9.5.2 with backend theme gin 3.0.0-rc1 .

anacolautti’s picture

Version: 6.0.0 » 6.0.x-dev
Status: Postponed (maintainer needs more info) » Reviewed & tested by the community
StatusFileSize
new2.59 KB

Ok, this is great, thank you all.
I reviewed the patch and had to do some modifications to be able to keep the functionality in these other issues that we also merged to dev:

- Issue #3228830 by thalles: Selector previous input password error
- Issue #3324373 by kkalashnikov, dineshkumarbollu, rishu_kumar, _pratik_: Drupal 10 compatibility

I tested this successfully in drupal/core:9.5.1 and drupal/core:10.0.x-dev.

I cannot reproduce the original bug, so if anyone else can confirm that this patch does the trick, let me know.
I can still add this patch to the dev branch, and merge it into the release 6.0.1 on Jan 30th.

anacolautti’s picture

Status: Reviewed & tested by the community » Needs review
phily’s picture

Using r4032login contrib module, I have double-eyed icon when trying to access restricted page with anonymous user (error 403 with login form).
Using patch #12 over view_password 6.0.x-dev and Drupal 9.5.2 makes the login form single-eyed.
Thanks.

May need additional review before moving to RTBC.

anacolautti’s picture

Status: Needs review » Reviewed & tested by the community

Thank you PhilY. I'll merge this and deploy today.

anacolautti’s picture

Status: Reviewed & tested by the community » Fixed

Thank you everyone that helped fix this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.