Actions
Bug #13720
closedWBootstrap5: Disabled WMenu items lose their classes on click
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
Updated by Matthias Van Ceulebroeck 6 months ago
- 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.
Updated by Romain Mardulyn 5 months ago
- Status changed from InProgress to Review
- Assignee deleted (Romain Mardulyn)
Updated by Matthias Van Ceulebroeck about 2 months ago
- Target version changed from 4.12.2 to 4.12.1
Updated by Matthias Van Ceulebroeck about 1 month ago
- Status changed from Review to Implemented @Emweb
- Assignee set to Romain Mardulyn
- % Done changed from 0 to 100
Updated by Matthias Van Ceulebroeck 22 days ago
- Status changed from Implemented @Emweb to Implemented @Test
Updated by Matthias Van Ceulebroeck 13 days ago
- Status changed from Implemented @Test to Closed
Actions