Fix bug with lane menu location after scroll

This commit is contained in:
Mattias Granlund 2023-07-07 16:08:05 +01:00
parent 1e4e3be1bb
commit e70dd4558e

View File

@ -14,7 +14,8 @@
}
export function openByElement(elt: HTMLElement, item: any) {
show(elt.offsetLeft + elt.clientWidth, elt.offsetTop + elt.clientHeight, item);
const rect = elt.getBoundingClientRect();
show(rect.left + rect.width, rect.top + rect.height, item);
}
function show(x: number, y: number, newItem: any) {