Project

General

Profile

Firefox 1.5.0.9 layout issue

Added by Paul de Wit over 6 years ago

Hello,

I am starting development of a website using Wt. The website must work with modern (evergreen) browsers, but also with one specific oldie: Firefox 1.5.0.9 (Dec. 2006). To test if Wt can do this, I created a basic main page with the following layout (no CSS used):

+---------------------+
| logo | title | menu |
+---------------------+
|    content pages    |
+---------------------+
|     status info     |
+---------------------+

The following code creates the main page:

auto logo = Wt::cpp14::make_unique<Wt::WImage>(WLink("/logo.png"));
auto title = Wt::cpp14::make_unique<Wt::WText>("Title");
auto menu = Wt::cpp14::make_unique<Wt::WText>("Menu");
auto hlayout_top = Wt::cpp14::make_unique<Wt::WHBoxLayout>();
hlayout_top->addWidget(std::move(logo), 0);
hlayout_top->addWidget(std::move(title), 1);
hlayout_top->addWidget(std::move(menu), 0);

...

auto vlayout = Wt::cpp14::make_unique<Wt::WVBoxLayout>();
vlayout->addLayout(std::move(hlayout_top), 0);
vlayout->addLayout(std::move(hlayout_mid), 1);
vlayout->addLayout(std::move(hlayout_bot), 0);

auto framework = Wt::cpp14::make_unique<Wt::WContainerWidget>();
framework->setLayout(std::move(vlayout));

root()->addWidget(std::move(framework));

Chrome 60 and Firefox 55 display the page correctly. But Firefox 1.5.0.9 draws the logo, title and menu vertically:

+---------+
| logo    |
+---------+
| title   |
+---------+
| menu    |
+---------+
| content |
+---------+
| status  |
+---------+

Why is the page not rendered correctly in Firefox 1.5.0.9? Should the main screen layout be created differently?

BTW. I'm using Wt 4.0.0-rc2 with Boost 1.64.


Replies (3)

RE: Firefox 1.5.0.9 layout issue - Added by Roel Standaert over 6 years ago

Have you tried to set the preferred implementation for your layouts to JavaScript? See https://www.webtoolkit.eu/wt/wt-4.0.0-rc2/doc/reference/html/classWt_1_1WLayout.html#a9cd0547c710e357e4c688ccfdb790d8f.

We detect when an old version of Internet Explorer is used and automatically switch to the JavaScript implementation, but no such check is done for Firefox. Normally, people who are using Firefox or Chrome are using the latest version. Wt doesn't guarantee that everything will always look correctly in browsers that old, but the basic functionality will probably work.

RE: Firefox 1.5.0.9 layout issue - Added by Paul de Wit over 6 years ago

This is an embedded device for which we cannot update the Firefox. With preferred implementation for layouts set to Javascript, FF 1.5.0.9 does not display the layout at all.

What browsers and browser versions are used for testing Wt releases?

Is there a browser compatibility matrix (Wt functions vs. browser versions)?

RE: Firefox 1.5.0.9 layout issue - Added by Roel Standaert over 6 years ago

We generally make sure that Wt works correctly on the latest versions of Chrome, Firefox, and Edge, and on several versions of Internet Explorer. Usually, except for some newer features, Wt can function correctly as far back as IE6, but we don't make sure that every single feature still looks good on browsers that old. It has recently become even more difficult for us to test with IE6 and 7 because Microsoft does not distribute VMs for those browsers anymore.

On mobile, we usually test with Chrome on Android and Safari on iOS.

Seeing as this is something that only affects the look---not the functionality---of the web application, making this work correctly on Firefox 1.5 is not a priority to us. I think you'll be hard-pressed to find a framework that does properly support it. It does surprise me that the JavaScript implementation of layouts does not work on Firefox 1.5, though, because I believe it does work on old Internet Explorer versions.

    (1-3/3)