looks like popover light dismiss is still broken in safari 18 (but there's a strange workaround: add a pointerdown on your body)
looks like popover light dismiss is still broken in safari 18 (but there's a strange workaround: add a pointerdown on your body) 10 comments
@konnorrogers @mayank I investigated and reached the point where I needed a debugger which I could never get working for the iOS simulator so I gave up unfortunately. But our hunch is correct based on all I've seen. @konnorrogers @mayank as of the next MDN data release the docs for popover should at least reflect the bug and Safari's partial support so that's something. @mayank @konnorrogers at least it's a simple workaround even if it's an incredibly cursed one. I only found it by trying to debug the issue and suddenly it disappeared 🙃 @russbaldwin @mayank unfortunately I've not seen any commits that look like they've fixed it. It's surprising that such a core feature is broken but then it seemingly always was broken, so their release testing must be lackluster. I'd be interested to see examples of where pointerdown event listeners on the root didn't fix it. It might help with finding the cause. Our best guess is there's a fast path to avoid handling pointer events when there's no listeners, but this breaks light dismiss. @russbaldwin @mayank specifically it seems to be related to a fast path for touch screens not converting presses to pointers events unnecessarily. This is why it works on desktop Safari (and iPad with a trackpad). It's also broken on WPE Android too, so it's not iOS specific but touch devices. |
@mayank `:active` for buttons also never fires on mobile safari unless you have a pointer event on the body 🙃