summaryrefslogtreecommitdiff
path: root/assets/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/components')
-rw-r--r--assets/js/components/suggest-menu.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/js/components/suggest-menu.js b/assets/js/components/suggest-menu.js
index 63a7551c..d23e4c37 100644
--- a/assets/js/components/suggest-menu.js
+++ b/assets/js/components/suggest-menu.js
@@ -194,8 +194,8 @@ KB.component('suggest-menu', function(containerElement, options) {
function renderMenu(items) {
var parentElement = getParentElement();
var caretPosition = getCaretCoordinates(containerElement, containerElement.selectionEnd);
- var left = caretPosition.left + containerElement.offsetLeft;
- var top = caretPosition.top + containerElement.offsetTop + 16;
+ var left = caretPosition.left + containerElement.offsetLeft - containerElement.scrollLeft;
+ var top = caretPosition.top + containerElement.offsetTop - containerElement.scrollTop + 16;
document.addEventListener('keydown', onKeyDown, false);