Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66643

No error pages are shown with JavaScript disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.10.1
    • WebEngine
    • None
    • Archlinux

    Description

      When a page load fails but JavaScript is disabled, a blank page is shown instead of the error page (which seems to rely on JS to show anything).

      This can be reproduced by disabling JS in simplebrowser:

      diff --git a/examples/webenginewidgets/simplebrowser/main.cpp b/examples/webenginewidgets/simplebrowser/main.cpp
      index 9b9bf80b..5e8fae37 100644
      --- a/examples/webenginewidgets/simplebrowser/main.cpp
      +++ b/examples/webenginewidgets/simplebrowser/main.cpp
      @@ -73,6 +73,7 @@ int main(int argc, char **argv)
      app.setWindowIcon(QIcon(QStringLiteral(":AppLogoColor.png")));
      
      QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
      + QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::JavascriptEnabled, false);
      
      QUrl url = commandLineUrlArgument();
      
      

      and then loading e.g. https://foobarblah.com/ (which does not exist). Chromium seems to display the error pages properly even when JS is disabled in its settings.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes