Skip to content

Commit 05ffd09

Browse files
authored
Merge pull request #3907 from paulkaplan/fix-block-changing
Remove setTimeout for reattaching workspace block listener.
2 parents 0c93823 + b32ca25 commit 05ffd09

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/containers/blocks.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,7 @@ class Blocks extends React.Component {
328328
error.message = `Workspace Update Error: ${error.message}`;
329329
log.error(error);
330330
}
331-
// All of the changes that happened during the load above are queued with
332-
// timeouts, so re-enable the listener in the next tick, so it happens after
333-
// the events are already fired.
334-
setTimeout(() => this.workspace.addChangeListener(this.props.vm.blockListener));
331+
this.workspace.addChangeListener(this.props.vm.blockListener);
335332

336333
if (this.props.vm.editingTarget && this.state.workspaceMetrics[this.props.vm.editingTarget.id]) {
337334
const {scrollX, scrollY, scale} = this.state.workspaceMetrics[this.props.vm.editingTarget.id];

0 commit comments

Comments
 (0)