social-app
social-app copied to clipboard
Dialogs close `onmouseup` when dragging cursor outside dialog bounds
Describe the bug
Dialogs like "Edit my profile" currently close if the user clicks within the dialog, drags their cursor outside the dialog, and then releases the click. This can commonly happen when attempting to select text within an input.
To Reproduce
Steps to reproduce the behavior:
- Click and hold down within a dialog.
- Drag the cursor outside of the dialog.
- Release the click.
- The dialog closes.
Expected behavior
The dialog remains open when an onmouseup
event triggers outside of a dialog.
Screenshots
https://github.com/bluesky-social/social-app/assets/4117920/099b42e9-3265-42d8-b7bf-ed565903b80a
Details
- Build version: 1.80.0
- Platform: web
- Operating System: macOS
- Browser: Chrome v124
Additional context
⧽(•‿•)⧼ thank you
this happens because click
event doesn't discern where the click originally started from, only where it ended, I'll try to have a look
got a solution working for old modals but have to figure out a nice solution that works for modals implemented with the newer components
You can close my issue about it as well when it gets fixed https://github.com/bluesky-social/social-app/issues/1894