Fix captcha scrolling in MS Edge. #1070

This commit is contained in:
ccd0 2016-09-10 22:33:27 -07:00
parent de0d779029
commit dce42ce168
2 changed files with 5 additions and 3 deletions

View File

@ -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: ->

View File

@ -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;