Просмотр исходного кода

Merge pull request #16453 from overleaf/ii-review-panel-dismiss-bulk-actions

[web] Fix bulk actions in review panel

GitOrigin-RevId: c78c99b0a3b005a0a4490ce393eb5d540f23ebc2
ilkin-overleaf 2 лет назад
Родитель
Сommit
f67e19f6d2

+ 4 - 1
services/web/frontend/js/features/source-editor/extensions/changes/change-manager.ts

@@ -376,7 +376,10 @@ export const createChangeManager = (
         broadcastChange()
         broadcastChange()
         // Dispatch a focus:changed event to force the Angular controller to
         // Dispatch a focus:changed event to force the Angular controller to
         // reassemble the list of entries without bulk actions
         // reassemble the list of entries without bulk actions
-        scheduleDispatchFocusChanged(view.state, 'rejectChanges')
+        setTimeout(() => {
+          // Delay the execution to make sure it runs after `broadcastChange`
+          scheduleDispatchFocusChanged(view.state, 'rejectChanges')
+        }, 30)
         break
         break
       }
       }