Fix table scroll wrapping [SCI-7569]

This commit is contained in:
Martin Artnik 2022-12-14 14:32:23 +01:00
parent 96aea292fb
commit 3ea059529d
3 changed files with 5 additions and 3 deletions

View file

@ -234,6 +234,7 @@ var TinyMCE = (function() {
setTimeout(() => { setTimeout(() => {
$(editor.editorContainer).addClass('show'); $(editor.editorContainer).addClass('show');
$('.tinymce-placeholder').remove(); $('.tinymce-placeholder').remove();
updateScrollPosition($(editor.editorContainer).closest('.tinymce-container'));
}, 400); }, 400);
// Init saved status label // Init saved status label
@ -310,7 +311,6 @@ var TinyMCE = (function() {
editorForm.find('.tinymce-status-badge').addClass('hidden'); editorForm.find('.tinymce-status-badge').addClass('hidden');
editorForm.find('.tinymce-view').removeClass('hidden'); editorForm.find('.tinymce-view').removeClass('hidden');
editor.remove(); editor.remove();
updateScrollPosition(editorForm); updateScrollPosition(editorForm);
if (onSaveCallback) { onSaveCallback(); } if (onSaveCallback) { onSaveCallback(); }
}) })

View file

@ -73,7 +73,7 @@
}, },
mounted() { mounted() {
if (this.isNew) { if (this.isNew) {
this.enableEditMode() this.enableEditMode();
} }
}, },
methods: { methods: {

View file

@ -145,7 +145,9 @@
return $(`meta[name=\'${name}\']`).attr('content'); return $(`meta[name=\'${name}\']`).attr('content');
}, },
wrapTables() { wrapTables() {
$(this.$el).find('.tinymce-view table').wrapAll('<div style="overflow: auto"></div>'); this.$nextTick(() => {
$(this.$el).find('.tinymce-view table').css('float', 'none').wrapAll('<div style="overflow: auto"></div>');
});
}, },
initCharacterCount() { initCharacterCount() {
if (!this.editorInstance()) return; if (!this.editorInstance()) return;