Closed Bug 626471 Opened 13 years ago Closed 13 years ago

Make initial filters (passed in parameters) working again

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mounir, Assigned: mounir)

References

Details

Attachments

(1 file)

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.
(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 ;)
Attached patch Patch v1Splinter Review
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+
Pushed:
https://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/9a192458c2bb
Status: ASSIGNED → RESOLVED
Closed: 13 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.

Attachment

General

Created:
Updated:
Size: