mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
fix the selected item not in the center sometimes
This commit is contained in:
@@ -112,7 +112,7 @@ export function scrollToSelectedItem(parentEl: Framework7Dom, containerSelector:
|
||||
return;
|
||||
}
|
||||
|
||||
const containerPaddingTop = getNumberValue(container.css('padding-top'), 0);
|
||||
const containerPaddingTop = getNumberValue(container.css('padding-top'), 0) / 2;
|
||||
|
||||
let targetPos = selectedItem.offset().top - container.offset().top - containerPaddingTop
|
||||
- (container.outerHeight() - selectedItem.outerHeight()) / 2;
|
||||
|
||||
Reference in New Issue
Block a user