overleaf/services/web/frontend
Domagoj Kriskovic c931d90f34 Wait for "doc:saved" event before compiling (#16153)
* wait doc:saved before compiling

* Refactor DocumentCompiler class to handle pending operations before compilation

* add timeout for pending op

* Increase PENDING_OP_MAX_WAIT to 10000 milliseconds

* check if currentDoc exists

* check doc id on doc:saved

* Fix conditional statement

* Refactor to add and remove event listeners for doc:saved event

* check if getPendingOp exists

* typeof getPendingOp

* forgot to push updates

* add flush-changes event

* use promise for handling pending operations

* Remove console.logs

* add isAwaitingBufferedOps

* Revert "add isAwaitingBufferedOps"

This reverts commit 56b0bbc13caf6375d1cf50e8f65f599e7263c404.

* move _awaitBufferedOps in try block

* dont check for matching doc id

* add a todo comment

GitOrigin-RevId: 9225e7d1a7a69385dc1a26bf7663f89f59db6a8a
2024-01-16 09:04:05 +00:00
..
fonts Merge pull request #16085 from overleaf/mf-website-redesign-business 2023-12-14 09:03:36 +00:00
js Wait for "doc:saved" event before compiling (#16153) 2024-01-16 09:04:05 +00:00
macros Merge pull request #15957 from overleaf/jpa-invalidate-babel-cache 2024-01-05 09:03:17 +00:00
stories Merge pull request #15946 from overleaf/msm-new-notification-others 2024-01-09 09:03:55 +00:00
stylesheets Merge pull request #14951 from overleaf/ab-split-test-calculator 2024-01-15 09:04:22 +00:00
extracted-translations.json Merge pull request #16319 from overleaf/jdt-grammarly-ad-redesign 2024-01-08 09:05:40 +00:00
translations-loader.js