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

In qml the WebEngineView at the onNavigationRequested signal the WebEngineNavigationRequest.LinkClickedNavigation is unpreditable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.10, 5.12.5
    • WebEngine, WebView
    • None
    • Ubuntu 18.04.3 LTS, Gnome 3.28.2, Lenovo T480
    • Linux/X11

    Description

      Application loads a page and restrict any navigation further from there or within. "Safe browsing." Possibly even anything pops up, like menus are blocked. However mouse clicks on HTML elements such as input boxes, buttons on forms are allowed. ( therefore event filter for Mouse clicks is not possible as a workaround )

      Created two WebEngineView. With url,"http://hs.fi" and "http://www.ampparit.fi" as in attachment. Using request.action = WebEngineNavigationRequest.IgnoreRequest at onNavigationRequested when request.navigationType===WebEngineNavigationRequest.LinkClickedNavigation to block user navigation away and within by mouse clicks.

      Expectations:
      Whenever a new content loads as user clicks on something, the onNavigationRequested will be called with request.navigationType===WebEngineNavigationRequest.LinkClickedNavigation.
       where navigation can be altered.

      Additionally onLoadingChanged called too. (with all status from start to  WebEngineLoadRequest.LoadSucceededStatus )

      With 5.10,  "click "Kirjaudu" blocked in hs page but not the other page. In 5.12 click any of them opened/navigate fine.
      Daily links are blocked on hs with 5.12 as expected, however "TV" ,weather link is not on ampparit. They show without getting any LinkClickedNavigation to block the user. Neither onLoadingChanged called during the content fetched and change.

      Before clicking even anything I receive requests with  LinkClickedNavigation. That is unexpected. As there is no such user interaction.

      Attachments

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

        Activity

          People

            davidsz Szabolcs David
            a_denever A Denever
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes