aboutsummaryrefslogtreecommitdiff
path: root/src/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/hint.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/content/hint.js b/src/content/hint.js
index f59899d..fabf725 100644
--- a/src/content/hint.js
+++ b/src/content/hint.js
@@ -10,12 +10,14 @@ export default class Hint {
let doc = target.ownerDocument
let { top, left } = target.getBoundingClientRect();
+ let scrollX = window.scrollX;
+ let scrollY = window.scrollY;
this.element = doc.createElement('span');
this.element.className = 'vimvixen-hint';
this.element.textContent = tag;
- this.element.style.top = top + 'px';
- this.element.style.left = left + 'px';
+ this.element.style.left = left + scrollX + 'px';
+ this.element.style.top = top + scrollY + 'px';
this.show();
doc.body.append(this.element);