From 148b892cfdff90a388f3c16072b61f56ff0d2176 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sun, 20 Sep 2020 07:20:57 +0200 Subject: [PATCH] Update SpellCheck.plugin.js --- Plugins/SpellCheck/SpellCheck.plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/SpellCheck/SpellCheck.plugin.js b/Plugins/SpellCheck/SpellCheck.plugin.js index 252ba28bbd..a0ca48472e 100644 --- a/Plugins/SpellCheck/SpellCheck.plugin.js +++ b/Plugins/SpellCheck/SpellCheck.plugin.js @@ -5,7 +5,7 @@ module.exports = (_ => { "info": { "name": "SpellCheck", "author": "DevilBro", - "version": "1.5.3", + "version": "1.5.4", "description": "Adds a spellcheck to all textareas. Select a word and rightclick it to add it to your dictionary." } }; @@ -179,7 +179,8 @@ module.exports = (_ => { let textarea = BDFDB.DOMUtils.getParent(BDFDB.dotCN.textarea, e.instance.props.target), word = null; if (textarea) for (let error of textarea.parentElement.querySelectorAll(BDFDB.dotCN._spellcheckerror)) { let rects = BDFDB.DOMUtils.getRects(error); - if (BDFDB.InternalData.mousePosition.pageX > rects.x && BDFDB.InternalData.mousePosition.pageX < (rects.x + rects.width) && BDFDB.InternalData.mousePosition.pageY > rects.y && BDFDB.InternalData.mousePosition.pageY < (rects.y + rects.height)) { + let position = BDFDB.ListenerUtils.getPosition(); + if (position.pageX > rects.x && position.pageX < (rects.x + rects.width) && position.pageY > rects.y && position.pageY < (rects.y + rects.height)) { word = error.innerText; break; }