No need to prevent scrolling when using noscript captcha.

This commit is contained in:
ccd0 2015-06-20 18:45:28 -07:00
parent 690005c40e
commit d34944e1c4

View File

@ -133,11 +133,12 @@ QR =
QR.hasFocus = d.activeElement and QR.nodes.el.contains(d.activeElement) QR.hasFocus = d.activeElement and QR.nodes.el.contains(d.activeElement)
QR.nodes.el.classList.toggle 'focus', QR.hasFocus QR.nodes.el.classList.toggle 'focus', QR.hasFocus
# XXX Stop unwanted scrolling due to captcha. # XXX Stop unwanted scrolling due to captcha.
if QR.inCaptcha() if QR.captcha.isEnabled and !QR.captcha.noscript
QR.scrollY = window.scrollY if QR.inCaptcha()
$.on d, 'scroll', QR.scrollLock QR.scrollY = window.scrollY
else $.on d, 'scroll', QR.scrollLock
$.off d, 'scroll', QR.scrollLock else
$.off d, 'scroll', QR.scrollLock
inBubble: -> inBubble: ->
d.activeElement in $$('.goog-bubble-content > iframe') d.activeElement in $$('.goog-bubble-content > iframe')