Skip to content

Dismissible dialog drag in+drag out dismisses  #3933

@jamiebuilds

Description

@jamiebuilds

🐛 Bug Report

You can reproduce this in the docs: https://react-spectrum.adobe.com/react-aria/useModalOverlay.html#dismissable

In the dismissible example:

  • Open Dialog
  • Press start on inside of dialog, drag outside of dialog, press end
  • Dialog does not close
  • Press start on outside of dialog, drag inside of dialog, press end
  • Dialog does not close

Then try this:

  • Press start on outside of dialog, drag inside of dialog, press end
  • Press start on inside of dialog, drag outside of dialog, press end
  • Dialog closes (wrong)

🤔 Expected Behavior

  • Press start on outside of dialog, drag inside of dialog, press end
  • Press start on inside of dialog, drag outside of dialog, press end
  • Dialog does not close

😯 Current Behavior

See above

💁 Possible Solution

It seems to be holding onto some state between the two interactions that make it think the drag started and ended outside of the dialog.

🔦 Context

Discovered when fixing unrelated bug.

💻 Code Sample

The dismissible example in the docs: https://react-spectrum.adobe.com/react-aria/useModalOverlay.html#dismissable

🌍 Your Environment

Software Version(s)
react-spectrum 3.22.0
Browser Safari, Chrome
Operating System macOS

🧢 Your Company/Team

Signal

🕷 Tracking Issue (optional)

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions