Project

General

Profile

wt 4.9.0: WDialog and WMessageBox don't close or hide on accept() and reject()

Added by Stefan Bn over 1 year ago

Thanks for all the work with the new version Wt 4.9.0!

I have several WMessageBox and WDialog that I remove later at the end of some code blocks using removeChild(dialog).

Since Wt 4.9.0 (and Bootstrap 5) those dialogs remain visible on the screen after accept() , reject() was called. In earlier Wt versions the MessageBox and Dialogs where hidden/closed using these methods.

Is this a bug or a feature? :-)

Stefan


Replies (4)

RE: wt 4.9.0: WDialog and WMessageBox don't close or hide on accept() and reject() - Added by Stefan Bn over 1 year ago

I did further reseach and I see that are major changes in the WBootstrap5Theme file structure. There are some announcements in the release notes, but nothing specifically to this.

In the Wt installation directory now there are two themes folders, instead of one in previous Wt versions:

./share/Wt/resources/themes/bootstrap/5

and

./share/themes/bootstrap/5

Only the first one within the resources folder contains main.css and I guess this is the file that should be used in useStyleSheet , like this?

auto bootsTheme = std::make_shared<WBootstrap5Theme>();
this->setTheme(bootsTheme);
this->useStyleSheet("resources/themes/bootstrap/5/main.css");

How should the folder ./share/themes/bootstrap/5 be handled or placed in Wt distribution file structures?

RE: wt 4.9.0: WDialog and WMessageBox don't close or hide on accept() and reject() - Added by Mark Travis over 1 year ago

I have this same issue. I have a generic landing page with a log-on button in the menu. I create, then hide the loginwidget dialog until the login button is pressed.

It used to be hidden. Now it shows up as soon as the page loads and before the WPushButton triggers the connect() event. I can't "cancel" it with the cancel button, either.

I put a break-point on the methods that are called with the button signal, but they don't break now, so something is going on with the signal engine.

Something strange is going on with 4.9.0. I'm going to back-level to 4.8.3 until it's fixed.

RE: wt 4.9.0: WDialog and WMessageBox don't close or hide on accept() and reject() - Added by Roel Standaert over 1 year ago

You should not need to load the main.css file in addition to setting the Bootstrap 5 theme. The theme will make sure it is loaded.

./share/themes/bootstrap/5 is the Sass source code that is used to compile the theme. It's only there if you want to customize the theme (this is part of the "Bootstrap 5 theme customization" mentioned in the release notes).

I'll have to investigate this issue.

    (1-4/4)