1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 23:50:11 +01:00

Merge pull request #439 from marktaiwan/post-form

file selector: correct typo, click event target
This commit is contained in:
Fredrick Brennan 2015-03-30 06:25:03 +08:00
commit 3b2ad6f4bf

View File

@ -141,11 +141,12 @@ $(document).on('click', '.dropzone .remove-btn', function (e) {
removeFile(file);
});
$(document).on('keypress click', '.dropzone, .dropzone .file-hint', function (e) {
$(document).on('keypress click', '.dropzone', function (e) {
e.stopPropagation();
// accept mosue click or Enter
if (e.which != 1 && e.which != 13)
// accept mouse click or Enter
if ((e.which != 1 || e.target.className != 'file-hint') &&
e.which != 13)
return;
var $fileSelector = $('<input type="file" multiple>');