mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(header): fix collapsing iOS header when using with split pane (#19480)
fixes #19541
This commit is contained in:
@ -88,7 +88,9 @@ export const handleToolbarIntersection = (ev: any, mainHeaderIndex: HeaderIndex,
|
||||
const rootArea = event.rootBounds.width * event.rootBounds.height;
|
||||
|
||||
const isPageHidden = intersectionArea === 0 && rootArea === 0;
|
||||
const isPageTransitioning = intersectionArea > 0 && (intersection.left !== event.rootBounds.left || intersection.right !== event.rootBounds.right);
|
||||
const leftDiff = Math.abs(intersection.left - event.boundingClientRect.left);
|
||||
const rightDiff = Math.abs(intersection.right - event.boundingClientRect.right);
|
||||
const isPageTransitioning = intersectionArea > 0 && (leftDiff >= 5 || rightDiff >= 5);
|
||||
|
||||
if (isPageHidden || isPageTransitioning) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user