aboutsummaryrefslogtreecommitdiff
path: root/src/client/views
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-06-15 09:57:46 -0400
committerbobzel <zzzman@gmail.com>2023-06-15 09:57:46 -0400
commita6181a5695c7355b7996ac6c6c1e7aad886e6302 (patch)
tree21aa88c53a159ff6a69ab6f5f8a72550579ba220 /src/client/views
parentbe0730195d8090337ca5cd007b69615ede354ca8 (diff)
fixed updating server cache when window/tab closes.
Diffstat (limited to 'src/client/views')
-rw-r--r--src/client/views/MainView.tsx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index b0e992cb6..c0c473cfc 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -529,6 +529,7 @@ export class MainView extends React.Component {
});
initEventListeners = () => {
+ window.addEventListener('beforeunload', () => DocServer.UPDATE_SERVER_CACHE());
window.addEventListener('drop', e => e.preventDefault(), false); // prevent default behavior of navigating to a new web page
window.addEventListener('dragover', e => e.preventDefault(), false);
// document.addEventListener("pointermove", action(e => SearchBox.Instance._undoBackground = UndoManager.batchCounter ? "#000000a8" : undefined));