Merge remote-tracking branch 'origin/support/3.1' into support/3.2

This commit is contained in:
Molkobain
2024-04-02 10:26:27 +02:00
3 changed files with 33 additions and 1 deletions

View File

@@ -37,7 +37,9 @@ $(function () {
sticky_sentinel_top: 'ibo-sticky-sentinel-top',
},
js_selectors: {
global: {},
global: {
fullscreen_elements: '.ibo-is-fullscreen',
},
block: {
panel_header: '[data-role="ibo-panel--header"]:first',
panel_header_sticky_sentinel_top: '[data-role="ibo-panel--header--sticky-sentinel-top"]:first',
@@ -132,10 +134,18 @@ $(function () {
})
// ... we consider the header as sticking...
.on('enter', function () {
// N°4631 - If a non-intersecting element is fullscreen, we do nothing
if ($(me.js_selectors.global.fullscreen_elements).length > 0) {
return;
}
me._onHeaderBecomesSticky();
})
// ... and when it comes back in the viewport, it stops.
.on('leave', function () {
// N°4631 - If a non-intersecting element is fullscreen, we do nothing
if ($(me.js_selectors.global.fullscreen_elements).length > 0) {
return;
}
me._onHeaderStopsBeingSticky();
})
.addTo(this.sticky_header_controller);