Project

General

Profile

Actions

Bug #10908

closed
NS RS

Select items with keys of a WSuggestionPopup using WBootstrap5Theme partially working

Bug #10908: Select items with keys of a WSuggestionPopup using WBootstrap5Theme partially working

Added by Nicolas Slusarenko about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
09/03/2022
Due date:
% Done:

100%

Estimated time:

Description

There is an excellent example featuring WSuggestionPopup in

wt-4.8.0/examples/feature/suggestionpopup/

It is possible to choose a suggestion using the keys: up, down and enter.
However, if I replace this line:

setCssTheme("polished");

by these,

auto bootstrapTheme = std::make_shared<Wt::WBootstrap5Theme>();
setTheme(bootstrapTheme);

The focus on the suggested items does not change as I press up and down.
However, the WSuggestionPopup keeps track of the keys up and down because once I press enter, the selected item is correct.
I would appreciate your help in solving this problem.
Thanks!

Nicolas

NS Updated by Nicolas Slusarenko about 4 years ago Actions #1

To use WBootstrap5Theme I added the line

#include <Wt/WBootstrap5Theme.h>

I tested with Bootstrap 3 Theme replacing previous lines with,

    auto bootstrapTheme = std::make_shared<Wt::WBootstrapTheme>();
    bootstrapTheme->setVersion(Wt::BootstrapVersion::v3);
    bootstrapTheme->setResponsive(true);
    setTheme(bootstrapTheme);
    useStyleSheet("resources/themes/bootstrap/3/bootstrap-theme.min.css");

Adding this line,

#include <Wt/WBootstrapTheme.h>

The focus on the suggestions change with the keys up and down, exactly as with Polished theme.
The focus does not change with Bootstrap 5.
Thanks,

Nicolas

RS Updated by Roel Standaert about 4 years ago Actions #2

  • Status changed from New to Analysis
  • Target version set to 4.9.0

RS Updated by Roel Standaert about 4 years ago Actions #3

  • Status changed from Analysis to New

RS Updated by Roel Standaert almost 4 years ago Actions #4

  • Target version changed from 4.9.0 to 4.10.0

RS Updated by Roel Standaert over 3 years ago Actions #5

I see that the first issue already is that at some point we're checking APP.theme (which is not defined), and instead should be checking WT.theme.

That doesn't quite fix everything, though.

RS Updated by Roel Standaert over 3 years ago Actions #6

  • Status changed from New to InProgress
  • Assignee set to Roel Standaert
  • Target version changed from 4.10.0 to 4.9.2

RS Updated by Roel Standaert over 3 years ago Actions #7

  • Status changed from InProgress to Review
  • Assignee deleted (Roel Standaert)

RS Updated by Roel Standaert over 3 years ago Actions #8

  • Status changed from Review to Resolved

RS Updated by Roel Standaert over 3 years ago Actions #9

  • Assignee set to Roel Standaert

RS Updated by Roel Standaert over 3 years ago Actions #10

  • % Done changed from 0 to 100

RS Updated by Roel Standaert over 3 years ago Actions #11

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom