From e577c018d57f1a685df3a694e78b21df8011e580 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 20 Feb 2015 21:53:50 -0800 Subject: [PATCH] Perform our anti-scroll hack a little earlier to deal with Google's latest nonsense. --- src/Posting/QR.coffee | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 2ceb7a7c8..fad4e913c 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -137,13 +137,13 @@ QR = unless $$('.goog-bubble-content > iframe').some((el) -> el.getBoundingClientRect().top >= 0) focus = d.activeElement and QR.nodes.el.contains(d.activeElement) $[if focus then 'addClass' else 'rmClass'] QR.nodes.el, 'focus' - if chrome? - # XXX Stop anomalous scrolling on space/tab in captcha iframe. - if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME' - QR.scrollY = window.scrollY - $.on d, 'scroll', QR.scrollLock - else - $.off d, 'scroll', QR.scrollLock + if chrome? + # 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' + QR.scrollY = window.scrollY + $.on d, 'scroll', QR.scrollLock + else + $.off d, 'scroll', QR.scrollLock scrollLock: -> if d.activeElement and QR.nodes.el.contains(d.activeElement) and d.activeElement.nodeName is 'IFRAME'