preventdefault
This commit is contained in:
parent
8a5bbe2b54
commit
4de10a54d2
@ -1448,6 +1448,7 @@
|
||||
if (!($('textarea', QR.qr).value || $('[type=file]', QR.qr).files.length)) {
|
||||
if (e) {
|
||||
alert('Error: No text entered.');
|
||||
e.preventDefault();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1134,7 +1134,9 @@ QR =
|
||||
submit: (e) ->
|
||||
#XXX e is undefined if method is called explicitly, eg, from auto posting
|
||||
unless $('textarea', QR.qr).value or $('[type=file]', QR.qr).files.length
|
||||
alert 'Error: No text entered.' if e #only alert if explicitly submitting
|
||||
if e
|
||||
alert 'Error: No text entered.'
|
||||
e.preventDefault()
|
||||
return
|
||||
{qr} = QR
|
||||
$('.error', qr).textContent = ''
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user