Closed ne0-cz closed 7 years ago
Thank you! It also fixes bug when cache
is disabled and popstate is trigged by url hash change (eg. click on link to document anchor). No ajax request should be made in this case.
The already merged solution brings actually causes, that back button is never processed and snippets are never updated from history. It does not depend on cache
being on/off. The e.state
in popstate handler is always undefined. Anyone has a same problem?
EDIT: Shouldn't it be e.originalEvent.state
in the condition? Since e
is jQuery Event Object and according to documentation, it does not contain event
property at all.
This fixes https://github.com/vojtech-dobes/history.nette.ajax.js/issues/29 based on http://stackoverflow.com/a/15897177/2278701