Hello! I found a problem.
On mobile chrome, when I touched browser's history navigation buttons (back, forward), pjax is not working properly. It works full reload.
---
pjax version: 0.2.5, 0.2.7
device: iPhone 7 / 8
iOS version: 12.0 (16A366)
mobile chrome version: 70.0.3538.75
if (st.state) {
var opt = clone(this.options)
opt.url = st.state.url
opt.title = st.state.title
// Since state already exists, prevent it from being pushed again
opt.history = false
opt.scrollPos = st.state.scrollPos
if (st.state.uid < this.lastUid) {
opt.backward = true
}
else {
opt.forward = true
}
this.lastUid = st.state.uid
// @todo implement history cache here, based on uid
this.loadUrl(st.state.url, opt)
}
}.bind(this))
On pc chrome, event handler is called. On mobile chrome, event handler is not called.
In this codes,
> on(window, "popstate", function(st) {
if (st.state) {
var opt = clone(this.options)
opt.url = st.state.url
opt.title = st.state.title
// Since state already exists, prevent it from being pushed again
opt.history = false
opt.scrollPos = st.state.scrollPos
if (st.state.uid < this.lastUid) {
opt.backward = true
}
else {
opt.forward = true
}
this.lastUid = st.state.uid
// @todo implement history cache here, based on uid
this.loadUrl(st.state.url, opt)
}
}.bind(this))
On pc chrome, event handler is called. On mobile chrome, event handler is not called.
This appears to be a reported issue with Chrome on iOS (see here, here, and here). I don't think there's anything we can do.
Although I haven't seen reports of it being an issue in iOS Safari, I personally had the same issue in Safari as well. MDN says that popstate has limited support in iOS Safari, so it's possible that this is one of the issues.
This appears to be a reported issue with Chrome on iOS (see [here](https://bugs.chromium.org/p/chromium/issues/detail?id=308674#c12), [here](https://stackoverflow.com/questions/46466618/why-popstate-doesnt-fire-my-function-when-back-button-is-clicked-mobile-ios-ch), and [here](https://productforums.google.com/forum/#!topic/chrome/n8_eZN7wFvM)). I don't think there's anything we can do.
Although I haven't seen reports of it being an issue in iOS Safari, I personally had the same issue in Safari as well. [MDN](https://developer.mozilla.org/en-US/docs/Web/Events/popstate) says that `popstate` has limited support in iOS Safari, so it's possible that this is one of the issues.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hello! I found a problem.
On mobile chrome, when I touched browser's history navigation buttons (back, forward), pjax is not working properly. It works full reload.
pjax version: 0.2.5, 0.2.7
device: iPhone 7 / 8
iOS version: 12.0 (16A366)
mobile chrome version: 70.0.3538.75
Can you give some more details about what's not working?
In this codes,
On pc chrome, event handler is called. On mobile chrome, event handler is not called.
What about in mobile Safari?
In mobile Safari, it works normally.
This appears to be a reported issue with Chrome on iOS (see here, here, and here). I don't think there's anything we can do.
Although I haven't seen reports of it being an issue in iOS Safari, I personally had the same issue in Safari as well. MDN says that
popstatehas limited support in iOS Safari, so it's possible that this is one of the issues.OK. Thank you for a long time.