Skip to content

Commit b86eb67

Browse files
committed
fix(modal): changing sheet offset to be based off of the header location, not toolbar
1 parent 52b544d commit b86eb67

File tree

1 file changed

+5
-5
lines changed
  • core/src/components/modal/gestures

1 file changed

+5
-5
lines changed

core/src/components/modal/gestures/sheet.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ export const createSheetGesture = (
178178
// and needs to be swapped back to stationary so it collapses correctly.
179179
if (index === 0) {
180180
cachedFooterYPosition = absoluteTop;
181-
// If there's a toolbar, we need to combine the toolbar height with the footer position
182-
// because the toolbar moves with the drag handle, so when it starts overlapping the footer,
181+
// If there's a header, we need to combine the header height with the footer position
182+
// because the header moves with the drag handle, so when it starts overlapping the footer,
183183
// we need to account for that.
184-
const toolbar = baseEl.querySelector('ion-toolbar') as HTMLIonToolbarElement | null;
185-
if (toolbar) {
186-
cachedFooterYPosition -= toolbar.clientHeight;
184+
const header = baseEl.querySelector('ion-header') as HTMLIonHeaderElement | null;
185+
if (header) {
186+
cachedFooterYPosition -= header.clientHeight;
187187
}
188188
}
189189
});

0 commit comments

Comments
 (0)