diff --git a/app/components/SimpleEditor/elements/track_change/TrackChangeControlCommand.js b/app/components/SimpleEditor/elements/track_change/TrackChangeControlCommand.js index f9b1f7c6963f79a88e50041ab7acf426d938d935..d3a7f5d04077c345dddd2d51dcc06d1810eeb5f2 100644 --- a/app/components/SimpleEditor/elements/track_change/TrackChangeControlCommand.js +++ b/app/components/SimpleEditor/elements/track_change/TrackChangeControlCommand.js @@ -11,7 +11,7 @@ class TrackChangeControlCommand extends Command { } execute (params, context) { const surface = context.surfaceManager.getSurface('body') - surface._owner.send('trackChangesUpdate') + surface.send('trackChangesUpdate') return true } } diff --git a/app/components/SimpleEditor/elements/track_change/TrackChangePackage.js b/app/components/SimpleEditor/elements/track_change/TrackChangePackage.js index 54a5aa2446ac2f03dfcc8d361b4c70afdacae679..e991a612de4db88d7ba8b007db427592c362117d 100644 --- a/app/components/SimpleEditor/elements/track_change/TrackChangePackage.js +++ b/app/components/SimpleEditor/elements/track_change/TrackChangePackage.js @@ -19,7 +19,7 @@ export default { config.addTool('track-change-toggle-view', TrackChangeControlViewTool, { target: 'track-change-toggle-view' }) - config.addCommand('track-change-enable', TrackChangeControlCommand, {target: 'document'}) + config.addCommand('track-change-enable', TrackChangeControlCommand) config.addCommand('track-change-toggle-view', TrackChangeControlViewCommand) config.addCommand(TrackChange.type, TrackChangeCommand, { nodeType: TrackChange.type }) config.addIcon('track-change', { 'fontawesome': 'fa-eye' })