Bug 84934
Summary: | Webview Element resets the url property | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alan Alpert <alan.alpert> |
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Enhancement | CC: | hausmann |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Alan Alpert
QML properties should always behave like simple values from the QML
perspective. This isn't to say that setting them can't have side-effects, but
when you explicitly set a property in QML it should change immediately (if it
was not already set to that value) and it should remain set to that value
until you explicitly unset or reset it (in this context, setting a binding
counts as an explicit setting and binding reevaluations would thus also count
as explicit settings). The url property of webview gets reset when webpage JS
redirects you, this is contrary to QML conventions. Upon setting the URL property to
something different the urlChanged signal should fire once immediately and only once
until you set it again.
I'm going to hazard a guess that the url property behaves like this because it
is trying to be both the desired and actual URL. These should be separate
properties, the url property could be the requested URL, which changes the
URL loaded when set, and there should be a separate read-only property for
loadedUrl, which may take some time to change after setting the url property.
It might then change a lot due to all the random redirections webpages have
these days.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Simon Hausmann
The last fix of bug #77554 covers exactly this issue, making sure that after setting the url property in QML it is changed _immediately_.
*** This bug has been marked as a duplicate of bug 77554 ***