New fixes for scrolling on space in captcha.

This commit is contained in:
ccd0 2016-07-09 09:26:02 -07:00
parent d255420eda
commit 1ab4856474
2 changed files with 6 additions and 1 deletions

View File

@ -138,6 +138,9 @@ Captcha.v2 =
$.global -> $.global ->
f = document.querySelector('#qr iframe') f = document.querySelector('#qr iframe')
f.focus = f.blur = -> 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')
$.on iframe.parentNode, 'scroll', -> @scrollTop = 0
fixQRPosition: -> fixQRPosition: ->
if QR.nodes.el.getBoundingClientRect().bottom > doc.clientHeight if QR.nodes.el.getBoundingClientRect().bottom > doc.clientHeight

View File

@ -1394,7 +1394,7 @@ input.field.tripped:not(:hover):not(:focus) {
margin: auto; margin: auto;
width: 304px; width: 304px;
} }
/* scrollable with scroll bar hidden; prevents scroll on space press */ /* 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 {
overflow: hidden; overflow: hidden;
} }
@ -1402,6 +1402,8 @@ input.field.tripped:not(:hover):not(:focus) {
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
padding-right: 15px; padding-right: 15px;
height: 99%;
width: 100%;
} }
#qr .captcha-counter { #qr .captcha-counter {
display: block; display: block;