Project

General

Profile

Actions

Bug #14767

open
MS RM

WPopupMenu::popup(const WMouseEvent&) pops up the menu outside the viewport

Bug #14767: WPopupMenu::popup(const WMouseEvent&) pops up the menu outside the viewport

Added by Michael Seibt 5 days ago. Updated about 11 hours ago.

Status:
InProgress
Priority:
High
Target version:
Start date:
08/19/2026
Due date:
% Done:

0%

Estimated time:

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 WText labeled "popup(const WMouseEvent&)"

Files

main.cpp (2.1 KB) main.cpp Michael Seibt, 08/19/2026 03:59 PM

MP Updated by max p 4 days ago Actions #1

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 WText labeled "popup(const WMouseEvent&)"

RM Updated by Romain Mardulyn about 11 hours ago Actions #2

  • Target version set to 4.14.2

RM Updated by Romain Mardulyn about 11 hours ago ยท Edited Actions #3

  • 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 Actions #4

  • Priority changed from Urgent to High
Actions

Also available in: PDF Atom