Perform our anti-scroll hack a little earlier to deal with Google's latest nonsense.
This commit is contained in:
parent
8c210a52f8
commit
e577c018d5
@ -137,13 +137,13 @@ QR =
|
|||||||
unless $$('.goog-bubble-content > iframe').some((el) -> el.getBoundingClientRect().top >= 0)
|
unless $$('.goog-bubble-content > iframe').some((el) -> el.getBoundingClientRect().top >= 0)
|
||||||
focus = d.activeElement and QR.nodes.el.contains(d.activeElement)
|
focus = d.activeElement and QR.nodes.el.contains(d.activeElement)
|
||||||
$[if focus then 'addClass' else 'rmClass'] QR.nodes.el, 'focus'
|
$[if focus then 'addClass' else 'rmClass'] QR.nodes.el, 'focus'
|
||||||
if chrome?
|
if chrome?
|
||||||
# XXX Stop anomalous scrolling on space/tab in captcha iframe.
|
# XXX Stop anomalous scrolling on space/tab in/into captcha iframe.
|
||||||
if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME'
|
if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME'
|
||||||
QR.scrollY = window.scrollY
|
QR.scrollY = window.scrollY
|
||||||
$.on d, 'scroll', QR.scrollLock
|
$.on d, 'scroll', QR.scrollLock
|
||||||
else
|
else
|
||||||
$.off d, 'scroll', QR.scrollLock
|
$.off d, 'scroll', QR.scrollLock
|
||||||
|
|
||||||
scrollLock: ->
|
scrollLock: ->
|
||||||
if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME'
|
if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user