Bug #14767
openWPopupMenu::popup(const WMouseEvent&) pops up the menu outside the viewport
0%
Description
Affected: Wt 4.14.1 & 4.14.0 (works up to 4.13.4)
The popup menu cannot be seen when WPopupMenu::popup(const WMouseEvent&) is invoked from e.g. WText.mouseWentUp.
(And WPopupMenu::popup(WWidget*) pops it up at the very bottom - not adjacent to the widget. Workaround: Wrap all in "WVBoxLayout" with stretch.)
STR:
- run the attached
main.cpp - click the right
WTextlabeled"popup(const WMouseEvent&)"
Files
MP Updated by max p 4 days ago
I can confirm it!
I updated WT to the newest version 4.14.1 and WPopupMenu is broken :(
Michael Seibt wrote:
Affected: Wt 4.14.1 & 4.14.0 (works up to 4.13.4)
The popup menu cannot be seen when
WPopupMenu::popup(const WMouseEvent&)is invoked from e.g.WText.mouseWentUp.(And
WPopupMenu::popup(WWidget*)pops it up at the very bottom - not adjacent to the widget. Workaround: Wrap all in "WVBoxLayout" with stretch.)STR:
- run the attached
main.cpp- click the right
WTextlabeled"popup(const WMouseEvent&)"
RM Updated by Romain Mardulyn about 11 hours ago
- Target version set to 4.14.2
RM Updated by Romain Mardulyn about 11 hours ago ยท Edited
- Status changed from New to InProgress
- Assignee set to Romain Mardulyn
For WPopupMenu::popup(WWidget*), it is normal that it is placed at the end of the page. Even if it is not clearly visible in your example, the WText is stretched by the layout to the end of the page (You can see it by adding a background color to your WText ). The WPopupMenu just position itself at the end of the WText. The reason it was being placed above in 4.13.4 was due to what Wt did when giving up on finding a suitable place for the popup. Since we now delegate the positioning to the browser, that behavior changed.
RM Updated by Romain Mardulyn about 11 hours ago
- Priority changed from Urgent to High