Fix #3513: Missing rating error causes weird behavior in tag list on upload page.
Fix bug in the double submit prevention from #2789. Rather than unbinding the enter key on submit, have the enter key click the submit button instead. This avoids form submission when the submit button is disabled.
This commit is contained in:
@@ -62,11 +62,12 @@
|
||||
}
|
||||
|
||||
Danbooru.Upload.initialize_enter_on_tags = function() {
|
||||
$("#upload_tag_string,#post_tag_string").on("keydown.danbooru.submit", null, "return", function(e) {
|
||||
var $textarea = $("#upload_tag_string, #post_tag_string");
|
||||
var $submit = $textarea.parents("form").find('input[type="submit"]');
|
||||
|
||||
$textarea.on("keydown.danbooru.submit", null, "return", function(e) {
|
||||
if (!Danbooru.autocompleting) {
|
||||
$("#form").trigger("submit");
|
||||
$("#quick-edit-form").trigger("submit");
|
||||
$("#upload_tag_string,#post_tag_string").off(".submit");
|
||||
$submit.click();
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user