Project

General

Profile

Actions

Bug #14824

closed
RP RM

Bootstrap 3: WPopupMenu does not align with its parent

Bug #14824: Bootstrap 3: WPopupMenu does not align with its parent

Added by Raf Pauwels 20 days ago. Updated 6 days ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
09/17/2026
Due date:
% Done:

0%

Estimated time:

Description

When using Wt with the Bootstrap 3 theme, a Wt::WPopupMenu attached to an item in a right-aligned navigation menu is positioned at the far left edge of the page instead of directly below its menu item.

Steps to reproduce

  1. Create a Wt::WNavigationBar.
  2. Add a Wt::WMenu with Wt::AlignmentFlag::Right.
  3. Add a Wt::WMenuItem to that menu.
  4. Attach a Wt::WPopupMenu to the menu item using WMenuItem::setMenu().
  5. Run the application with Wt::WBootstrap3Theme.
  6. Click the menu item.

Expected behavior

The popup menu should appear directly below, and horizontally aligned with, the menu item that opened it.

Actual behavior

The popup is displayed to the left of the right-aligned menu area, but it is not aligned with the menu item that opened it. Its position is determined by the navbar’s CSS rather than by the triggering WMenuItem.

The likely conflict is Bootstrap 3's rule:

.navbar-right .dropdown-menu {
  right: 0;
  left: auto;
}

This rule changes the popup’s horizontal positioning after Wt calculates its location.

This is not applicable to Bootstrap 5 or a default theme.

RM Updated by Romain Mardulyn 19 days ago Actions #2

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn 19 days ago Actions #3

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

ED Updated by emil de keyser 13 days ago Actions #4

  • Assignee set to emil de keyser

RM Updated by Romain Mardulyn 8 days ago Actions #5

  • Target version changed from 4.15.0 to 4.14.4

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

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

RM Updated by Romain Mardulyn 6 days ago Actions #7

  • Status changed from Resolved to Implemented @Emweb

RM Updated by Romain Mardulyn 6 days ago Actions #8

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: PDF Atom