this.reload is not a function #65

Closed
opened 2016-03-20 18:51:26 -05:00 by cj · 4 comments
cj commented 2016-03-20 18:51:26 -05:00 (Migrated from github.com)

When I click a link that I'm already on I get this.reload is not a function 546b7e309a/lib/proto/attach-link.js (L48) I'm using version 0.2.2 via npm

When I click a link that I'm already on I get `this.reload is not a function` https://github.com/MoOx/pjax/blob/546b7e309a8812594edee127eeb48cce0e6a7b88/lib/proto/attach-link.js#L48 I'm using version 0.2.2 via npm
danielfilho commented 2016-03-22 02:29:36 -05:00 (Migrated from github.com)

got the same problem.
should I submit a PR replacing this.reload() for this.location.reload()?

not sure if this is the wanted behaviour for this. but it happens when I click to a / link and I am at /. but even though, in this case, a reload doesn't seem to be the wanted behaviour.

kinda confused on how I can help here 😕

got the same problem. should I submit a PR replacing `this.reload()` for `this.location.reload()`? not sure if this is the wanted behaviour for this. but it happens when I click to a `/` link and I am at `/`. but even though, in this case, a reload doesn't seem to be the wanted behaviour. kinda confused on how I can help here :confused:
MoOx commented 2016-03-22 02:36:47 -05:00 (Migrated from github.com)

Feel free to push any fix.

The idea of reload is that if you are on a page and click on the same page, if we do nothing, UX is going to be weird. That's why I added this behavior in the first place.

Feel free to push any fix. The idea of reload is that if you are on a page and click on the same page, if we do nothing, UX is going to be weird. That's why I added this behavior in the first place.
danielfilho commented 2016-03-23 23:07:30 -05:00 (Migrated from github.com)

got it.

I've changed this, but feels weird to do a window.location.reload() on a lib that is supposed to not reload the browser. maybe just a return false or something (which will also feel weird).

I'm really not sure on how should be the behaviour :/

got it. I've changed this, but feels weird to do a `window.location.reload()` on a lib that is supposed to not reload the browser. maybe just a `return false` or something (which will also feel weird). I'm really not sure on how should be the behaviour :/
MoOx commented 2016-03-24 07:32:29 -05:00 (Migrated from github.com)

Default behavior is now back to normal (just pjax, as expected by most people). The option currentUrlFullReload was ignored (regression of the 0.2 release). Things should be ok with 0.2.3

Default behavior is now back to normal (just pjax, as expected by most people). The option `currentUrlFullReload` was ignored (regression of the 0.2 release). Things should be ok with 0.2.3
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#65