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

fix(password-input): stop propagation when toggling input type #230

Merged
merged 1 commit into from
Aug 12, 2020

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Aug 12, 2020

Issue #229

This PR addresses a critical bug where toggling the PasswordInput component inside a Modal would inadvertently close the modal. This also affects the ComposedModal component.

This hot fix stops the propagation of the click event on the "toggle password" icon.

Changes

  • add stopPropagation modifier to on:click in PasswordInput
  • update stories for Modal/ComposedModal to include a PasswordInput and Button inside the modals

Test

  1. Go to default Modal story
  2. Click outside the modal to close it
  3. Re-open it and toggle the password input (modal should not close)
  4. Click on the "Programmatically toggle password" button (modal should not close)

@metonym metonym merged commit a7a257c into master Aug 12, 2020
@metonym metonym deleted the fix-password-input branch August 12, 2020 21:25
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.

1 participant