Skip to content

Commit

Permalink
IBX-8352: Handled disabled distraction-free mode
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Jun 3, 2024
1 parent 28aa901 commit 0912d86
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bundle/Resources/public/js/CKEditor/core/base-ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ const VIEWPORT_TOP_OFFSET_DISTRACTION_FREE_MODE = 0;
const distractionFreeModeControlNodeBtn = fieldEditNode.querySelector(
'.ibexa-field-edit__distraction-free-mode-control-container .ibexa-field-edit__distraction-free-mode-btns',
);

if (distractionFreeModeControlNodeBtn === null) {
return;
}

const dataSourceNode = fieldEditNode.querySelector('.ibexa-data-source');
const { offsetWidth: distractionFreeModeControlNodeBtnWidth } = distractionFreeModeControlNodeBtn;
const { offsetWidth: dataSourceNodeWidth } = dataSourceNode;
Expand Down

0 comments on commit 0912d86

Please sign in to comment.