demo · v133

Live toggle event log

A popover whose body contains the very button that opens it. Click the nested trigger and the log shows just one open event — the bug was that pre-133 it fired open, close, open in rapid succession, causing a flicker.

Inside the popover. The button below is also marked popovertarget="pop" — nested inside its own target.

open the popover, then click the nested button. event log appears here.

before / after

// pre-133
toggle: open  (click on outer button)
toggle: close (click on nested re-invokes → treats as a re-toggle)
toggle: open  (browser re-opens because invoker said so)
→ visible flicker, lost focus.

// 133+
toggle: open  (click on outer button)
(click on nested is recognised as “already invoked”)
→ no extra events; popover stays open.

see also