Skip to content

Commit 6837ee9

Browse files
committed
#618: Tabbing through Text Options Toolbar - Fixed toolbar visibility after fullscreen exit
1 parent af7e0ce commit 6837ee9

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/wysiwyg/tinymce4.js

Lines changed: 24 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/wysiwyg/tinymce4.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,26 @@ export default class Wysiwyg implements WysiwygInterface {
123123

124124
// Update content in our stage preview wysiwyg after its slideout counterpart gets updated
125125
events.on(`form:${this.contentTypeId}:saveAfter`, this.setContentFromDataStoreToWysiwyg.bind(this));
126+
127+
events.on(`stage:${this.stageId}:fullScreenModeChangeAfter`, this.toggleFullScreen.bind(this));
128+
}
129+
130+
/**
131+
* Hide TinyMce inline toolbar options after fullscreen exit
132+
*/
133+
public toggleFullScreen()
134+
{
135+
const $editor = $(`#${this.elementId}`);
136+
// wait for fullscreen to close
137+
_.defer(() => {
138+
if (!checkStageFullScreen(this.stageId) &&
139+
this.config.adapter_config.mode === "inline" &&
140+
$editor.hasClass('mce-edit-focus')
141+
) {
142+
$editor.removeClass('mce-edit-focus');
143+
this.onBlur();
144+
}
145+
});
126146
}
127147

128148
/**

0 commit comments

Comments
 (0)