Fix captcha scrollbar auto-hide bug.

This fixes an issue where clicking the scrollbar of the image
selection bubble would cause the QR to autohide, breaking the
captcha.
This commit is contained in:
ccd0 2015-08-05 19:07:46 -07:00
parent dadbca7d84
commit 90d2385b0b

View File

@ -155,7 +155,8 @@ QR =
$.off d, 'scroll', QR.scrollLock
inBubble: ->
d.activeElement in $$('.goog-bubble-content > iframe')
bubbles = $$ '.goog-bubble-content > iframe'
d.activeElement in bubbles or bubbles.some((el) -> el.getBoundingClientRect().bottom > 0)
inCaptcha: ->
(d.activeElement?.nodeName is 'IFRAME' and QR.nodes.el.contains(d.activeElement)) or (QR.hasFocus and QR.inBubble())