summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab-chrome.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tab-chrome.c b/src/tab-chrome.c
index 719d362..d99f8bf 100644
--- a/src/tab-chrome.c
+++ b/src/tab-chrome.c
@@ -200,6 +200,13 @@ static void
load_progress_cb(WebKitWebView *web_view,
GParamSpec __attribute__((unused)) *paramspec, MqTabChrome *chrome)
{
+ /*
+ * If loading fails, the WebKitWebView's "estimated-load-progress" is
+ * set to 1.0 after signals like "load-changed" and "load-failed" are
+ * emitted. So the only way to avoid leaving behind a full progress bar
+ * after, for example, canceling a page load is to save a flag on a
+ * failed load and only update the progress bar if the flag is unset.
+ */
if (chrome->load_failed) {
chrome->load_failed = FALSE;
return;