From dce42ce1684ee060deea487f7aeb95def6e80a39 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 10 Sep 2016 22:33:27 -0700 Subject: [PATCH] Fix captcha scrolling in MS Edge. #1070 --- src/Posting/Captcha.v2.coffee | 2 +- src/css/style.css | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee index 6c42cc2de..ebedfeb5b 100644 --- a/src/Posting/Captcha.v2.coffee +++ b/src/Posting/Captcha.v2.coffee @@ -139,7 +139,7 @@ Captcha.v2 = f = document.querySelector('#qr iframe') f.focus = f.blur = -> # XXX Make sure scroll on space prevention (see src/css/style.css) doesn't cause scrolling of div - if $.engine is 'blink' and iframe.parentNode in $$('#qr .captcha-container > div > div:first-of-type') + if $.engine in ['blink', 'edge'] and iframe.parentNode in $$('#qr .captcha-container > div > div:first-of-type') $.on iframe.parentNode, 'scroll', -> @scrollTop = 0 fixQRPosition: -> diff --git a/src/css/style.css b/src/css/style.css index 50d7fa1d3..6f51ca726 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -1395,10 +1395,12 @@ input.field.tripped:not(:hover):not(:focus) { width: 304px; } /* XXX scrollable with scroll bar hidden; prevents scroll on space press */ -:root.ua-blink #qr .captcha-container > div { +:root.ua-blink #qr .captcha-container > div, +:root.ua-edge #qr .captcha-container > div { overflow: hidden; } -:root.ua-blink #qr .captcha-container > div > div:first-of-type { +:root.ua-blink #qr .captcha-container > div > div:first-of-type, +:root.ua-edge #qr .captcha-container > div > div:first-of-type { overflow-y: scroll; overflow-x: hidden; padding-right: 15px;