You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
WPopover now opens reliably when triggerBuilder returns an interactive widget (a WButton or WAnchor with its own onTap), and no longer dismisses itself on the same gesture that opened it. Two defects were in play. First, the trigger was wired through an outer GestureDetector(onTap: toggle); an interactive trigger owns its own GestureDetector, won the gesture arena, and the outer onTap never fired, so the popover never opened. The trigger now toggles through a Listener(onPointerDown:), whose pointer events bypass the tap arena entirely, so opening works regardless of the trigger's interactivity (enableTriggerOnTap and disabled semantics are unchanged). Second, because the trigger and overlay share a TapRegion group id (intentionally, so a trigger re-tap does not self-close), the opening gesture's pointer-up reached the freshly mounted overlay's onTapOutside and dismissed the popover on the frame it opened. A one-shot, post-frame guard now swallows exactly that first outside-tap; a genuine, later outside tap still closes the popover. (lib/src/widgets/w_popover.dart; covered by test/widgets/w_popover/gesture_regression_test.dart, the four-behavior regression set parameterized over WButton and WDiv triggers.) Because the pointer Listener is invisible to assistive technologies, the trigger is wrapped in Semantics(button: true, onTap: ...) so screen readers and keyboard activation still reach the toggle, and the pointer toggle is filtered to the primary button so a secondary (right) click no longer opens the popover.