aboutsummaryrefslogtreecommitdiff
path: root/src/ClientUtils.ts
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-03 13:33:37 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-06-03 13:33:37 -0400
commit9e77f980e7704999ef0a1c1845d660bccb13ff8a (patch)
tree14ca0da5915e4382a7bcb15f7d0b241941c8291f /src/ClientUtils.ts
parent1be63695875c9242fba43d580465e8765cf3991d (diff)
parent202e994515392892676f8f080852db1e32b8dbd3 (diff)
Merge branch 'master' into nathan-starter
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r--src/ClientUtils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ClientUtils.ts b/src/ClientUtils.ts
index dbbba896f..d03ae1486 100644
--- a/src/ClientUtils.ts
+++ b/src/ClientUtils.ts
@@ -518,7 +518,7 @@ export function simulateMouseClick(element: Element | null | undefined, x: numbe
export function getWordAtPoint(elem: any, x: number, y: number): string | undefined {
if (elem.tagName === 'INPUT') return 'input';
if (elem.tagName === 'TEXTAREA') return 'textarea';
- if (elem.nodeType === elem.TEXT_NODE) {
+ if (elem.nodeType === elem.TEXT_NODE || elem.textContent) {
const range = elem.ownerDocument.createRange();
range.selectNodeContents(elem);
let currentPos = 0;