fix(header): fix collapsing iOS header when using with split pane (#19480)

fixes #19541
This commit is contained in:
Liam DeBeasi
2019-10-04 15:21:15 -04:00
committed by GitHub
parent 17614cdcb3
commit dea1c2635d
2 changed files with 17 additions and 8 deletions

View File

@ -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;