Durandaljs router reloads the page regardless of "trigger: false" parameter In Firefox

96 Views Asked by At

I need to modify the url hash, but not reload the page (not trigger module activation), so I do:

router.navigate(route, {trigger: false});

or

router.navigate(route, false); 

Both work in all browsers except Firefox. My Firefox version is 44.0.2.

Has anyone came across this behavior? Are there workarounds?

EDIT

As I came with no solution via durandaljs I simply used

history.pushState(null, null, "#"+route);
1

There are 1 best solutions below

0
On

I was also running into this issue, and it turned out to be because I wasn't properly encoding my query strings. Prior to the encoding, Firefox was causing re-activation of the viewmodel (even with the trigger: false), where Chrome and IE were handling the non-encoded query string just fine (and not causing reactivation).