v145 · light dismiss
A menu over a scrollable list
The shape where the old behaviour hurt: a menu opened over content the user still wants to move. Three gestures to try, and the page watches for each one — it detects what you did and whether the menu was still there afterwards, so nothing here depends on you reporting it honestly.
Open the menu, then try to keep it
Three gestures
Each gesture is detected from the events it produces: a scroll on the list while the menu is open, a contextmenu outside it, and an ordinary primary click outside. The verdict is read from whether the menu was still open a moment later — measured, not asked.
Why these two, and not the third
Scrolling and right-clicking should leave the menu alone, and an ordinary click outside should close it. That last one is not a bug being fixed — it is the behaviour everyone wants, and the reason the other two were so annoying: they were the same rule applied a fraction of a second too early.
On a touch device the scroll case is the one to try. A drag beginning outside the menu used to close it before the content had moved at all, so a user who wanted to look at the list behind their menu lost the menu instead — and on a phone, reopening it means finding the button again.