问题
After onpopstate event triggered, window.alert, window.confirm etc not working.
This is related console logs Image
And this is what I tested.
- First I registered
popstate
event. - And tried
window.alert('abc');
// It works. - Tried
history.back()
or click back button, thenpopstate
event triggered. - And tried
window.alert('abc');
// Not working.
I found the same issue, there is no answers left, so I post a question once again.
Alert, confirm, and prompt not working after using History API on Safari, iOS
- I can't do
location.reload
inside theonpopstate
event because of some issues.
Is there any ios bug report?
or.. Does anyone know why this happenes or how to fix it?
来源:https://stackoverflow.com/questions/58022927/ios-safari-window-alert-window-confirm-not-working-after-onpopstate-triggered