react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

useOverlay, useInteractOutside on iOS12 causes modals to disappear instantly

Open BartoszGamza opened this issue 5 years ago โ€ข 7 comments

๐Ÿ› Bug Report

As title says, on iOS 12 when using useOverlay (and useInteractOutside under the hood, which I believe might be a source of issue) the modal (or any other dialog basically) disappears instantly as presented on the movie attached. It can be easily reproduced by launching docs of useDialog in BrowserStack, on Safari 12

https://user-images.githubusercontent.com/26162660/125646656-35dee1b8-3b24-4603-8700-978fb7e77bee.mp4

๐Ÿค” Expected Behavior

The dialog should not close when appearing.

๐Ÿ˜ฏ Current Behavior

Dialog closes instantly after appearing.

๐Ÿ’ Possible Solution

๐Ÿ”ฆ Context

Even though the market share of iOS 12 is pretty low, the issue is quite severe - it completely disables the usage of dialog.

๐Ÿ’ป Code Sample

๐ŸŒ Your Environment

Software Version(s)
react-spectrum 1.2.2 (current latest)
Browser iOS Safari 12
Operating System iOS 12

๐Ÿงข Your Company/Team

livechat.com

๐Ÿ•ท Tracking Issue (optional)

BartoszGamza avatar Jul 14 '21 15:07 BartoszGamza

Just tested in Simulator on iOS 12.0 and wasn't able to reproduce. Tested on both iPhone 5s and iPhone X sims:

Update: Just tried on iPhone Xs sim and I am seeing the issue.

reidbarber avatar Jul 14 '21 16:07 reidbarber

We'd be happy to accept a fix for this but we won't be picking this up ourselves due to the limited area of effect (only iOS 12 + iPhone Xs) of this bug.

LFDanLu avatar Jul 27 '21 17:07 LFDanLu

Found this issue (or something similar) in the new useSelect on an ipad v 12.5.5

mitchellwarr avatar Dec 15 '21 00:12 mitchellwarr

@mitchellwarr do you have any updates to how to reproduce? I'm not seeing it on my iPhone. though admittedly i am on much different versions Would you be willing to do any debugging? We don't have much to go off unless you have some new repro steps/videos you'd be willing to share. Thank you! anything helps :)

snowystinger avatar Dec 15 '21 01:12 snowystinger

@snowystinger yes ive just finished creating a new issue for this here: https://github.com/adobe/react-spectrum/issues/2686

its different enough, i think, to this issue.

mitchellwarr avatar Dec 15 '21 01:12 mitchellwarr

@mitchellwarr o, fabulous, thank you!!

snowystinger avatar Dec 15 '21 01:12 snowystinger

@snowystinger glad to help! i think this issue isnt overly specific, since it was the first browserstack version i tried with iOS 12 and stumbled on the bug.

can confirm in local with iOS 14 everything was fine

mitchellwarr avatar Dec 15 '21 01:12 mitchellwarr