Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
5.4.0 Alpha
-
None
-
*ABI:* x86-windows-msvc2013-pe-32bit
*mkspec:* win32-msvc2013, gcc
*OS:* Windows 8 Pro 64-bit, Linux 64 bit
-
2cc9a92ad3796e6ec1e4cdfb3fe68eddc86ad4ac
Description
Using the QML WebEngineView component, canGoBack and canGoForward changes are not notified when the URL hash fragment changes. Consequences are that we can't synchronize navigation UI (go back/forward) based on these properties. This behavior can be observed with the nano browser example:
1. launch the nano browser example directly on a website using fragment routing: /quicknanobrowser "http://dev.sencha.com/ext/5.0.1/examples/executive-dashboard/index.html"
2. click the left menu to navigate on the website (URL hash will change)
Expected result: "back" button should be enabled
Actual result: "back" button stays disabled
Same for the "forward" button:
1. launch nano browser example
2. enter URL of the previous website
3. click the left menu to navigate on the website (URL hash will change)
4. click the "back" button (website is routed to the previous hash)
Expected result: "forward" button should be enabled
Actual result: "forward" button stays disabled
Debug
When reading the QML implementation of the WebEngineView, the canGoBack and canGoForward properties are based on the loadingChanged signal. The webview doesn't load when the URL hash changes, which seems the reason why canGoBack/Forward never changes. A potential fix would be to use instead the urlChanged as NOTIFY signal?
Q_PROPERTY(bool canGoBack READ canGoBack NOTIFY urlChanged) Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY urlChanged)
Attachments
For Gerrit Dashboard: QTBUG-41849 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
96669,2 | Notify canGoBack/canGoForward on urlChanged instead of loadingChanged. | 1.0 | qt/qtwebengine | Status: MERGED | +2 | 0 |