-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Dialog: closes when 1password icon is clicked #917
Dialog: closes when 1password icon is clicked #917
Comments
melt-ui-modal-1password.movHere's a recording of the problem. |
Thanks for raising this issue! We are actively working on cleaning up the "interact outside" behavior, so ensuring this works out of the box is something we definitely want to cover (1Password user myself). In the meantime, you should be able to get around this with something like this (not full code but you get the idea): <script lang="ts">
const overlayId = 'myOverlayId'
const { elements: { overlay }} = createDialog({
open: customOpen
onOutsideClick: (e) => {
const target = e.target as HTMLElement
if (target.id !== overlayId) {
e.preventDefault()
}
}
})
</script>
<!-- trigger and content stuff -->
<div use:melt={$overlay} id={overlayId} /> |
Selecting text inside input field with your mouse and dragging it outside the input field closes the dialog as well. This is related I understand. |
This is actually unrelated to this specific issue. |
Describe the bug
1Password - and other password managers - typically have a widget that shows up in password fields and which is appended to body.
This means that if I have a password field inside a modal and closeOnClickOutside is enabled - then clicking that widget will close the modal, which is not expected behavior.
This functionality should be probably implemented with "click on overlay" instead of catching clicks outside.
Reproduction
https://www.sveltelab.dev/b7dn7stqhkjikd0
IT WILL NOT WORK IN SVELTELAB: In SvelteLab 1password shows button in top-level page, while app itself is rendered in an iframe. So contents of an iframe never see the click on 1password button.
In order to reproduce you need 1password installed, fork this locally, then try clicking on 1password's icon next to password button.
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: