Project

General

Profile

Actions

Bug #14767

closed
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 19 days ago. Updated 11 days ago.

Status:
Closed
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 17 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 14 days ago Actions #2

  • Target version set to 4.14.2

RM Updated by Romain Mardulyn 14 days 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 14 days ago Actions #4

  • Priority changed from Urgent to High

RM Updated by Romain Mardulyn 13 days ago Actions #5

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)

ED Updated by emil de keyser 12 days ago Actions #6

  • Assignee set to emil de keyser

ED Updated by emil de keyser 12 days ago Actions #7

  • Status changed from Review to Resolved
  • Assignee changed from emil de keyser to Romain Mardulyn

RM Updated by Romain Mardulyn 12 days ago Actions #8

  • Status changed from Resolved to Implemented @Emweb

RM Updated by Romain Mardulyn 11 days ago Actions #9

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: PDF Atom