social-app icon indicating copy to clipboard operation
social-app copied to clipboard

Dialogs close `onmouseup` when dragging cursor outside dialog bounds

Open evadecker opened this issue 9 months ago • 3 comments

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:

  1. Click and hold down within a dialog.
  2. Drag the cursor outside of the dialog.
  3. Release the click.
  4. 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

evadecker avatar May 03 '24 01:05 evadecker

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

mary-ext avatar May 04 '24 08:05 mary-ext

got a solution working for old modals but have to figure out a nice solution that works for modals implemented with the newer components

mary-ext avatar May 04 '24 14:05 mary-ext

You can close my issue about it as well when it gets fixed https://github.com/bluesky-social/social-app/issues/1894

Sininini avatar May 06 '24 23:05 Sininini