Skip to content

Commit c8928f4

Browse files
committed
MC-4137: TinyMCE Issues within inline WYSIWYG
1 parent 5630c95 commit c8928f4

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

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

Lines changed: 0 additions & 16 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: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ export default class Wysiwyg implements WysiwygInterface {
127127
* Called for the onFocus event
128128
*/
129129
private onFocus() {
130-
this.clearSelection();
131-
132130
this.getFixedToolbarContainer()
133131
.addClass("pagebuilder-toolbar-active");
134132

@@ -157,8 +155,6 @@ export default class Wysiwyg implements WysiwygInterface {
157155
* Called for the onBlur events
158156
*/
159157
private onBlur() {
160-
this.clearSelection();
161-
162158
this.getFixedToolbarContainer()
163159
.removeClass("pagebuilder-toolbar-active")
164160
.find(".mce-tinymce-inline")
@@ -186,19 +182,6 @@ export default class Wysiwyg implements WysiwygInterface {
186182
);
187183
}
188184

189-
/**
190-
* Clear any selections in the editable area
191-
*/
192-
private clearSelection(): void {
193-
if (window.getSelection) {
194-
if (window.getSelection().empty) {
195-
window.getSelection().empty();
196-
} else if (window.getSelection().removeAllRanges) {
197-
window.getSelection().removeAllRanges();
198-
}
199-
}
200-
}
201-
202185
/**
203186
* Adjust padding on stage if in fullscreen mode to accommodate inline wysiwyg toolbar overflowing fixed viewport
204187
*/

0 commit comments

Comments
 (0)