summaryrefslogtreecommitdiff
path: root/ext/fg/js/util.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-02-08 09:24:14 -0800
committerAlex Yatskov <alex@foosoft.net>2017-02-08 09:24:14 -0800
commitf3fe0994f52067d7c6d1886b02afd8f0a2a15099 (patch)
tree7ed9b1bfbc0d0e9d665f91ae5297614846ebf95e /ext/fg/js/util.js
parentb3487370db3540a8cafa0346eed1e9109abe7682 (diff)
add option to disable imposters, bump version1.0.11
Diffstat (limited to 'ext/fg/js/util.js')
-rw-r--r--ext/fg/js/util.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/util.js b/ext/fg/js/util.js
index a7533846..641b73ac 100644
--- a/ext/fg/js/util.js
+++ b/ext/fg/js/util.js
@@ -93,12 +93,12 @@ function destroyImposters() {
}
}
-function textSourceFromPoint(point) {
+function textSourceFromPoint(point, imposter) {
const element = document.elementFromPoint(point.x, point.y);
if (element !== null) {
if (element.nodeName === 'IMG' || element.nodeName === 'BUTTON') {
return new TextSourceElement(element);
- } else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
+ } else if (imposter && (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA')) {
createImposter(element);
}
}