mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 19:28:29 +02:00
Fix several issues around browser back navigation (#825)
This commit is contained in:
@@ -16,7 +16,7 @@ const mutationObserver = new MutationObserver((mutations) => {
|
||||
});
|
||||
});
|
||||
|
||||
window.addEventListener("turbo:load", () => {
|
||||
document.addEventListener("turbo:load", () => {
|
||||
mutationObserver.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
@@ -25,6 +25,10 @@ window.addEventListener("turbo:load", () => {
|
||||
applyBehaviors(document.body);
|
||||
});
|
||||
|
||||
document.addEventListener("turbo:before-cache", () => {
|
||||
destroyBehaviors(document.body);
|
||||
});
|
||||
|
||||
export class Behavior {
|
||||
constructor(element) {
|
||||
this.element = element;
|
||||
|
Reference in New Issue
Block a user