WPopupMenu regression: isHidden() not accurate after cancel when not initially stubbed
With github master 3.3.6-25-gc0343391 (and wt4 preview), a WPopupMenu can incorrectly report isHidden() as false after a cancel when the WPopupMenu is actually hidden. This occurs if the WPopupMenu is not initially stubbed, which can occur if the WPopupMenu is created in response to an event, e.g. a WPushButton clicked() event.
A test program that illustrates the issue is attached.
For illustration of the expected external behavior, a variation on the test program that works around the issue by reusing a WPopupMenu created in the application's constructor is also attached.
Also attached, for your review, is a patch that seems to help with the issue revealed by the first test program. While I am hopeful that the patch will not adversely impact the earlier fix (associated with the regression), I was unable to verify this. There are additional notes on the patch.
Updated by André Jacobs over 5 years ago
- Status changed from New to Implemented @Emweb
- Assignee set to André Jacobs
This was indeed an issue. It has been fixed, but not with your proposed patch. The patch basically reverted the fix for an earlier bug. The actual problem was that the willPopup_ variable was not set to false on initial render.