mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
make the styling consistent across all pages of the mobile version
This commit is contained in:
@@ -138,7 +138,7 @@ export function getElementBoundingRect(selector: string): DOMRect | null {
|
||||
return el.getBoundingClientRect();
|
||||
}
|
||||
|
||||
export function scrollToSelectedItem(parentEl: Framework7Dom, containerSelector: string, selectedItemSelector: string): void {
|
||||
export function scrollToSelectedItem(parentEl: Framework7Dom, containerSelector: string, selectedItemSelector: string, hasBottomToolbar?: boolean): void {
|
||||
if (!parentEl || !parentEl.length) {
|
||||
return;
|
||||
}
|
||||
@@ -175,6 +175,11 @@ export function scrollToSelectedItem(parentEl: Framework7Dom, containerSelector:
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasBottomToolbar) {
|
||||
const toolbarHeight = parentEl.find('.toolbar.toolbar-bottom').outerHeight() || 0;
|
||||
targetPos += toolbarHeight / 2;
|
||||
}
|
||||
|
||||
container.scrollTop(targetPos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user