Merge pull request #6108 from artoscinote/ma_SCI_9184

Fix TinyMCE sticky header calculation [SCI-9184]
This commit is contained in:
artoscinote 2023-08-30 13:30:00 +02:00 committed by GitHub
commit fb177765da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,13 +195,12 @@ window.TinyMCE = (() => {
document.location.hash = `${textAreaObject.data('objectType')}_${textAreaObject.data('objectId')}`;
}
let topMenuHeight = $('.sci--navigation--top-menu-container') ? $('.sci--navigation--top-menu-container').height() : 0;
let breadcrumbsHeight = $('.sci--layout-navigation-breadcrumbs') ? $('.sci--layout-navigation-breadcrumbs').height() : 0;
let secondaryNavHeight = $('.content-header.sticky-header') ? $('.content-header.sticky-header').height() : 0;
let topMenuHeight = $('.sci--navigation--top-menu-container').length ? $('.sci--navigation--top-menu-container').height() : 0;
let breadcrumbsHeight = $('.sci--layout-navigation-breadcrumbs').length ? $('.sci--layout-navigation-breadcrumbs').height() : 0;
let secondaryNavHeight = $('.content-header.sticky-header').length ? $('.content-header.sticky-header').height() : 0;
editorToolbaroffset = topMenuHeight + breadcrumbsHeight + secondaryNavHeight;
return tinyMCE.init({
cache_suffix: '?v=6.5.1-19', // This suffix should be changed any time library is updated
selector,