diff --git a/src/index.js b/src/index.js index 2f4e40a..8c0bd4d 100644 --- a/src/index.js +++ b/src/index.js @@ -593,8 +593,9 @@ DjangoQL.prototype = { const inputRect = this.textarea.getBoundingClientRect(); const top = window.pageYOffset + inputRect.top + inputRect.height; + const left = inputRect.left + window.scrollX; this.completion.style.top = `${top}px`; - this.completion.style.left = `${inputRect.left}px`; + this.completion.style.left = `${left}px`; this.completion.style.display = 'block'; },