From da7a29d503567cf1f60805554919523bee4ce8c5 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 2 Dec 2018 23:19:15 -0800 Subject: [PATCH] chore: refactor PR #716 (#717) --- routes/_utils/delegate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/_utils/delegate.js b/routes/_utils/delegate.js index 032aa46..892bab1 100644 --- a/routes/_utils/delegate.js +++ b/routes/_utils/delegate.js @@ -17,7 +17,7 @@ function onEvent (e) { if (type === 'click') { let selection = window.getSelection() let selectionStr = selection && selection.toString() - if (selectionStr && selection.toString().length && target.contains(selection.anchorNode)) { + if (selectionStr && selectionStr.length && target.contains(selection.anchorNode)) { return // ignore if the user is selecting text inside the clickable area } }