Fix page scroll issue in autocomplete-component

This commit is contained in:
Zaid Abdulla committed 2018-12-27 01:21:18 -08:00
1 parent e1c340f4bc
commit 043b54fdd6
1 file changed
+2 -2
+2 -2
View File
@@ -22,9 +22,9 @@ class Autocomplete {
el.addEventListener("focus", () => {
this.element = el;
const domRect = el.getBoundingClientRect();
this.container.style.left = `${domRect.left}px`;
this.container.style.left = `${domRect.left + window.pageXOffset}px`;
this.container.style.width = `${domRect.width}px`;
this.container.style.top = `${domRect.bottom}px`;
this.container.style.top = `${domRect.bottom + window.pageYOffset}px`;
this.update();
});