overleaf/services/web/frontend/js/features/pdf-preview
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
..
components Throttle PDF.js resize listener (#16402) 2024-01-09 09:03:49 +00:00
controllers Merge pull request #8010 from overleaf/ta-synctex-unmount 2022-05-24 08:04:11 +00:00
hooks Allow compile to be triggered with Ctrl/Cmd-s when Caps Lock is enabled (#14547) 2023-09-04 08:04:31 +00:00
util Wait for "doc:saved" event before compiling (#16153) 2024-01-16 09:04:05 +00:00