File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/bundle/Resources/public/js/CKEditor/core Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -281,14 +281,15 @@ const VIEWPORT_TOP_OFFSET_DISTRACTION_FREE_MODE = 0;
281281 '.ibexa-field-edit__distraction-free-mode-control-container .ibexa-field-edit__distraction-free-mode-btns' ,
282282 ) ;
283283
284- if ( distractionFreeModeControlNodeBtn === null ) {
285- return ;
286- }
287-
288284 const dataSourceNode = fieldEditNode . querySelector ( '.ibexa-data-source' ) ;
289- const { offsetWidth : distractionFreeModeControlNodeBtnWidth } = distractionFreeModeControlNodeBtn ;
290285 const { offsetWidth : dataSourceNodeWidth } = dataSourceNode ;
291- const toolbarNodeMaxWidth = dataSourceNodeWidth - distractionFreeModeControlNodeBtnWidth ;
286+ let toolbarNodeMaxWidth = dataSourceNodeWidth ;
287+
288+ if ( distractionFreeModeControlNodeBtn !== null ) {
289+ const { offsetWidth : distractionFreeModeControlNodeBtnWidth } = distractionFreeModeControlNodeBtn ;
290+
291+ toolbarNodeMaxWidth = dataSourceNodeWidth - distractionFreeModeControlNodeBtnWidth ;
292+ }
292293
293294 toolbarNode . style . maxWidth = `${ toolbarNodeMaxWidth } px` ;
294295 } ;
You can’t perform that action at this time.
0 commit comments