From 20ecd85ca765709897f4371e556bcd45873606c4 Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Fri, 10 Mar 2017 17:08:05 -0600 Subject: [PATCH] Fix #2174, include left/right and not just top/bottom in the rule for when to capture an element's text --- addon/webextension/selector/util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addon/webextension/selector/util.js b/addon/webextension/selector/util.js index 5ed1708845..f10f8871e4 100644 --- a/addon/webextension/selector/util.js +++ b/addon/webextension/selector/util.js @@ -56,7 +56,9 @@ window.util = (function () { // eslint-disable-line no-unused-vars return; } if (elBox.bottom > box.bottom + CAPTURE_WIGGLE || - elBox.top < box.top - CAPTURE_WIGGLE) { + elBox.top < box.top - CAPTURE_WIGGLE || + elBox.right > box.right + CAPTURE_WIGGLE || + elBox.left < box.left - CAPTURE_WIGGLE) { // Partially outside the box for (var i=0; i