mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4631 - Fix a display issue when description field is fullscreen white using vertical tabs
This commit is contained in:
@@ -16,6 +16,20 @@ CKEDITOR.on('instanceReady', function (oEvent) {
|
|||||||
$('#'+ oEvent.editor.name).closest('form').trigger('submit');
|
$('#'+ oEvent.editor.name).closest('form').trigger('submit');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// N°4631 - Add a custom class to the CKEditor container when it is in fullscreen mode
|
||||||
|
// so elements know they should take into account intersecting with the editor
|
||||||
|
oEvent.editor.on('maximize', function() {
|
||||||
|
let container = this.container.getFirst( function( node ) {
|
||||||
|
return node.type === CKEDITOR.NODE_ELEMENT && node.hasClass( 'cke_inner' );
|
||||||
|
} );
|
||||||
|
if (this.commands.maximize.state === CKEDITOR.TRISTATE_ON) {
|
||||||
|
// The editor is in fullscreen mode, add the custom class
|
||||||
|
container.addClass('ibo-is-fullscreen-non-intersecting');
|
||||||
|
} else {
|
||||||
|
// The editor is not in fullscreen mode, remove the custom class
|
||||||
|
container.removeClass('ibo-is-fullscreen-non-intersecting');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// For disabling the CKEditor at init time when the corresponding textarea is disabled !
|
// For disabling the CKEditor at init time when the corresponding textarea is disabled !
|
||||||
|
|||||||
@@ -132,10 +132,18 @@ $(function () {
|
|||||||
})
|
})
|
||||||
// ... we consider the header as sticking...
|
// ... we consider the header as sticking...
|
||||||
.on('enter', function () {
|
.on('enter', function () {
|
||||||
|
// N°4631 - If a non-intersecting element is fullscreen, we do nothing
|
||||||
|
if ($('.ibo-is-fullscreen-non-intersecting').length > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
me._onHeaderBecomesSticky();
|
me._onHeaderBecomesSticky();
|
||||||
})
|
})
|
||||||
// ... and when it comes back in the viewport, it stops.
|
// ... and when it comes back in the viewport, it stops.
|
||||||
.on('leave', function () {
|
.on('leave', function () {
|
||||||
|
// N°4631 - If a non-intersecting element is fullscreen, we do nothing
|
||||||
|
if ($('.ibo-is-fullscreen-non-intersecting').length > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
me._onHeaderStopsBeingSticky();
|
me._onHeaderStopsBeingSticky();
|
||||||
})
|
})
|
||||||
.addTo(this.sticky_header_controller);
|
.addTo(this.sticky_header_controller);
|
||||||
|
|||||||
@@ -141,6 +141,10 @@ $(function()
|
|||||||
// Resize of the tab container
|
// Resize of the tab container
|
||||||
if(window.IntersectionObserver) {
|
if(window.IntersectionObserver) {
|
||||||
const oTabsListIntersectObs = new IntersectionObserver(function(aEntries, oTabsListIntersectObs){
|
const oTabsListIntersectObs = new IntersectionObserver(function(aEntries, oTabsListIntersectObs){
|
||||||
|
// N°4631 - If a non-intersecting element is fullscreen, we do nothing
|
||||||
|
if ($('.ibo-is-fullscreen-non-intersecting').length > 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
aEntries.forEach(oEntry => {
|
aEntries.forEach(oEntry => {
|
||||||
let oTabHeaderElem = $(oEntry.target);
|
let oTabHeaderElem = $(oEntry.target);
|
||||||
let bIsVisible = oEntry.isIntersecting;
|
let bIsVisible = oEntry.isIntersecting;
|
||||||
|
|||||||
Reference in New Issue
Block a user