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

luci: Make password reveal work with password managers #7479

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewdodd
Copy link

@andrewdodd andrewdodd commented Dec 17, 2024

Password managers (like LastPass etc) tend to add additional elements into the DOM for their own context menus. If this happens between the hide/reveal button and the password input, then the logic to reveal the password breaks.

This change updates the onclick handler to look backward in the DOM for the first sibling that is an input, and to then toggle the password/text type on that element.

  • This PR is not from my main or master branch 💩, but a separate branch ✅
  • Each commit has a valid ✒️ Signed-off-by: <[email protected]> row (via git commit --signoff)
  • Each commit and PR title has a valid 📝 <package name>: title first line subject for packages
  • Incremented 🆙 any PKG_VERSION in the Makefile
  • Tested on: (architecture, openwrt version, browser) ✅
  • ( Preferred ) Mention: @ the original code author for feedback
  • ( Preferred ) Screenshot or mp4 of changes:
  • ( Optional ) Closes: e.g. openwrt/luci#issue-number
  • ( Optional ) Depends on: e.g. openwrt/packages#pr-number in sister repo
  • Description: (describe the changes proposed in this PR)

@andrewdodd
Copy link
Author

This is a possible patch for #7478

@systemcrash systemcrash changed the title luci: Make password reveal work with passsword managers luci: Make password reveal work with password managers Jan 9, 2025
@systemcrash
Copy link
Contributor

Drop the merge commit. Rebase. Squash commits.

@systemcrash
Copy link
Contributor

Make sure to rebase as other changes in master are conflicting.

Password managers (like LastPass etc) tend to add additional elements
into the DOM for their own context menus. If this happens between the
hide/reveal button and the password input, then the logic to reveal the
password breaks.

This change updates the onclick handler to look backward in the DOM for
the first sibling that is an input, and to then toggle the password/text
type on that element.

Signed-off-by: Andrew Dodd <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants