aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/driver.js6
-rw-r--r--ext/fg/js/gecko.js12
2 files changed, 15 insertions, 3 deletions
diff --git a/ext/fg/js/driver.js b/ext/fg/js/driver.js
index 3b4c0c76..9d972abf 100644
--- a/ext/fg/js/driver.js
+++ b/ext/fg/js/driver.js
@@ -62,9 +62,9 @@ class Driver {
return;
}
- if (e.which === 1 /* lmb */) {
- return;
- }
+ // if (e.which === 1 /* lmb */) {
+ // return;
+ // }
if (this.options.scanning.requireShift && !e.shiftKey) {
return;
diff --git a/ext/fg/js/gecko.js b/ext/fg/js/gecko.js
new file mode 100644
index 00000000..21671749
--- /dev/null
+++ b/ext/fg/js/gecko.js
@@ -0,0 +1,12 @@
+if (!document.caretRangeFromPoint){
+ document.caretRangeFromPoint = function polyfillcaretRangeFromPoint(x,y){
+ let range = document.createRange();
+ let position = document.caretPositionFromPoint(x,y);
+ if (!position) {
+ return null;
+ }
+ range.setStart(position.offsetNode, position.offset);
+ range.setEnd(position.offsetNode, position.offset);
+ return range;
+ };
+}