Make initial filters (passed in parameters) working again

RESOLVED FIXED

Status

Tree Management Graveyard
TBPL
RESOLVED FIXED
7 years ago
3 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
Because there is a popupevent sent at the page load, they are overridden.
Having not looked at this code at all, why not:

* Always use a state object when calling pushstate.
* On popstate, if the state object is null, ignore the popstate / look at the parameters passed in however they're passed.

Although you might be tempted to call replaceState before the page loads and set a state object, that won't work until bug 615501 lands.
(Assignee)

Comment 2

7 years ago
(In reply to comment #1)
> Having not looked at this code at all, why not:
> 
> * Always use a state object when calling pushstate.

We do.

> * On popstate, if the state object is null, ignore the popstate / look at the
> parameters passed in however they're passed.

I tried but it didn't work. I should re-examine that.

> Although you might be tempted to call replaceState before the page loads and
> set a state object, that won't work until bug 615501 lands.

Let's try to find a solution that actually works now ;)
(Assignee)

Comment 3

7 years ago
Created attachment 504579 [details] [diff] [review]
Patch v1

So the method suggested by Justin is working. I must have done something stupid when I tried earlier.
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #504579 - Flags: review?(arpad.borsos)
Attachment #504579 - Flags: review?(arpad.borsos) → review+
(Assignee)

Comment 4

7 years ago
Pushed:
https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/9a192458c2bb
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.