Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

If you go back while page is loading, progressbar does not stops loading. #1156

Open
Gozala opened this issue Jul 1, 2016 · 6 comments
Open
Assignees
Milestone

Comments

@Gozala
Copy link
Contributor

Gozala commented Jul 1, 2016

This is really bad because progressbar will never actually finish loading.

@Gozala Gozala added this to the Demo followup fixes milestone Jul 1, 2016
@Gozala
Copy link
Contributor Author

Gozala commented Jul 1, 2016

Fix would be to just handle goBack / goForward / stop similar to how we handle LoadEnd

@paulrouget
Copy link
Contributor

Aren't we supposed to get a loadend event from Servo followed by a loadstart on goBack?

@Gozala
Copy link
Contributor Author

Gozala commented Aug 3, 2016

Aren't we supposed to get a loadend event from Servo followed by a loadstart on goBack?

You tell me :) But it does not seem to, so if you go back while page is loading we wind up with infinitely loading progressbar.

@paulrouget
Copy link
Contributor

it does not seem to

I'll look. If it doesn't, let's fix it in Servo.

@paulrouget paulrouget self-assigned this Aug 4, 2016
@paulrouget
Copy link
Contributor

paulrouget commented Aug 8, 2016

Not to self: going back too early suspend an already suspended timeline.

<iframe mozbrowser="true"></iframe>

<script>
  var iframe = document.querySelector("iframe");
  var once = (elt, event, cb) => {
    var _cb = () => {
      elt.removeEventListener(event, _cb);
      cb();
    }
    elt.addEventListener(event, _cb);
  }
  iframe.addEventListener("mozbrowserloadstart", e => console.log("START"));
  iframe.addEventListener("mozbrowserloadend", e => console.log("END"));
  once(iframe, "mozbrowserloadend", () => {
    once(iframe, "mozbrowserloadstart", () => iframe.goBack());
    iframe.src = "http://example.com/test";
  });
  iframe.src = "http://example.com";
</script>

@paulrouget
Copy link
Contributor

paulrouget commented Aug 9, 2016

We first need this: servo/servo#12784

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants