mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Defer updates of remote ops until Ace has been updated
This commit is contained in:
parent
f4bbd8ea10
commit
7418d12bf8
1 changed files with 6 additions and 1 deletions
|
@ -353,7 +353,12 @@ define [
|
|||
@ranges.applyOp op, { user_id: track_changes_as }
|
||||
if old_id_seed?
|
||||
@ranges.setIdSeed(old_id_seed)
|
||||
@emit "ranges:dirty"
|
||||
if remote_op
|
||||
# With remote ops, Ace hasn't been updated when we receive this op,
|
||||
# so defer updating track changes until it has
|
||||
setTimeout () => @emit "ranges:dirty"
|
||||
else
|
||||
@emit "ranges:dirty"
|
||||
|
||||
_catchUpRanges: (changes = [], comments = []) ->
|
||||
# We've just been given the current server's ranges, but need to apply any local ops we have.
|
||||
|
|
Loading…
Reference in a new issue