Focus the captcha on captcha error. Fix #187.
This commit is contained in:
parent
31badbae9d
commit
7a2eee99f7
@ -1285,6 +1285,7 @@
|
||||
el.textContent = err;
|
||||
if (node) $.replace(el.firstChild, node);
|
||||
qr.open();
|
||||
if (/captcha|verification/i.test(err)) $('[autocomplete]', qr.el).focus();
|
||||
if (d.hidden || d.oHidden || d.mozHidden || d.webkitHidden) {
|
||||
return alert(err);
|
||||
}
|
||||
|
||||
@ -931,6 +931,9 @@ qr =
|
||||
el.textContent = err
|
||||
$.replace el.firstChild, node if node
|
||||
qr.open()
|
||||
if /captcha|verification/i.test err
|
||||
# Focus the captcha input on captcha error.
|
||||
$('[autocomplete]', qr.el).focus()
|
||||
alert err if d.hidden or d.oHidden or d.mozHidden or d.webkitHidden
|
||||
cleanError: ->
|
||||
$('.warning', qr.el).textContent = null
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user