Email or username:

Password:

Forgot your password?
Mayank

looks like popover light dismiss is still broken in safari 18 (but there's a strange workaround: add a pointerdown on your body)

bugs.webkit.org/show_bug.cgi?i

10 comments
Konnor Rogers

@mayank `:active` for buttons also never fires on mobile safari unless you have a pointer event on the body 🙃

Mayank

@konnorrogers at least that one is not a crucial feature (usually). very strange either way

Konnor Rogers

@mayank I've poked @Lukew about this a couple times. Our best guess right now is that Safari has some fast path that seems to ignore these click handlers when there's no pointer events to worry about. I don't know if he ever ended up investigating

Luke

@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.

Luke

@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

@Lukew @konnorrogers this is awesome! everyone using popover needs to be aware of this bug

Luke

@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 🙃

Russ

@mayank I'm not sure the pointerdown worked in some situations or was more trouble that it was worth. Anyway surely this should be fixed by now, it has worked in Safari Desktop for some time and 'light dismissal' is one of the key features of popover.

Luke

@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.

Luke

@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.

Go Up