diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee index abce1d18b..6703c8dac 100644 --- a/src/Posting/Captcha.v2.coffee +++ b/src/Posting/Captcha.v2.coffee @@ -241,6 +241,7 @@ Captcha.v2 = fixBubble: (node) -> {bottom, right, width} = node.getBoundingClientRect() if ( + getComputedStyle(node).visibility isnt 'hidden' and bottom > 0 and # not deliberately offscreen right > doc.clientWidth # offscreen to right ) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 82e66f082..547c5d2f8 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -154,7 +154,8 @@ QR = inBubble: -> bubbles = $$ 'iframe[src^="https://www.google.com/recaptcha/api2/frame"]' - d.activeElement in bubbles or bubbles.some((el) -> el.getBoundingClientRect().bottom > 0) + d.activeElement in bubbles or bubbles.some (el) -> + getComputedStyle(el).visibility isnt 'hidden' and el.getBoundingClientRect().bottom > 0 inCaptcha: -> (d.activeElement?.nodeName is 'IFRAME' and QR.nodes.el.contains(d.activeElement)) or (QR.hasFocus and QR.inBubble())