Project

General

Profile

Actions

Bug #13720

closed
AA RM

WBootstrap5: Disabled WMenu items lose their classes on click

Bug #13720: WBootstrap5: Disabled WMenu items lose their classes on click

Added by Andrey Alekseev over 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
High
Target version:
Start date:
05/02/2025
Due date:
% Done:

100%

Estimated time:

Description

In my bootstrap-themed app I have a menu with nav-pills style

menu->setStyleClass("nav nav-pills");

Some items are conditionally disabled.

When I click any item, the disabled ones lose their classes and look like regular links.
The affected elements are <a>.
Here's the initial class list: Wt-no-default disabled nav-link.
And only Wt-no-default remains after i click something.

here's a part of ajax, i saw on the inspector tab

var j521=Wt4_11_4.$('oop2c02');
j521.className='Wt-no-default';
j521.setAttribute('href','#');
Wt4_11_4.$('oop2c02').classList.remove('active');

I have no slots connected to the menu, only WStackedWidget was passed to the constructor.
This bug appeared when I updated from Wt 4.11.2 to Wt 4.11.4

MV Updated by Matthias Van Ceulebroeck over 1 year ago Actions #1

  • Target version set to 4.12.2

This seems to be a consequence of #13600, where DomElement::addPropertyWord(Property::Class, ...) is pushing the style class too strongly.

RM Updated by Romain Mardulyn over 1 year ago Actions #2

  • Status changed from New to InProgress

RM Updated by Romain Mardulyn over 1 year ago Actions #3

  • Assignee set to Romain Mardulyn

RM Updated by Romain Mardulyn over 1 year ago Actions #4

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

MV Updated by Matthias Van Ceulebroeck about 1 year ago Actions #5

  • Target version changed from 4.12.2 to 4.12.1

MV Updated by Matthias Van Ceulebroeck about 1 year ago Actions #6

  • Status changed from Review to Implemented @Emweb
  • Assignee set to Romain Mardulyn
  • % Done changed from 0 to 100

MV Updated by Matthias Van Ceulebroeck 12 months ago Actions #7

  • Status changed from Implemented @Emweb to Implemented @Test

MV Updated by Matthias Van Ceulebroeck 11 months ago Actions #8

  • Status changed from Implemented @Test to Closed
Actions

Also available in: PDF Atom