mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 07:21:05 +00:00
play nice w/ other software that uses window.onpopstate
This commit is contained in:
parent
fec34cb18e
commit
d3d5155085
@ -3536,6 +3536,7 @@ return (function () {
|
||||
internalData.xhr.abort();
|
||||
}
|
||||
});
|
||||
var originalPopstate = window.onpopstate;
|
||||
window.onpopstate = function (event) {
|
||||
if (event.state && event.state.htmx) {
|
||||
restoreHistory();
|
||||
@ -3545,6 +3546,10 @@ return (function () {
|
||||
'triggerEvent': triggerEvent
|
||||
});
|
||||
});
|
||||
} else {
|
||||
if (originalPopstate) {
|
||||
originalPopstate(event);
|
||||
}
|
||||
}
|
||||
};
|
||||
setTimeout(function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user