Skip to content

Commit

Permalink
Fix #4661: Change shortcut for submitting uploads from Enter to Ctrl+…
Browse files Browse the repository at this point in the history
…Enter

Also fix #4734.
  • Loading branch information
evazion committed Aug 28, 2021
1 parent 38edbb0 commit 3486167
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/javascript/src/javascripts/uploads.js.erb
Expand Up @@ -12,10 +12,6 @@ Upload.IQDB_MIN_SIMILARITY = 50;
Upload.IQDB_HIGH_SIMILARITY = 70;

Upload.initialize_all = function() {
if ($("#c-uploads,#c-posts").length) {
Utility.keydown("return", "submit", Upload.submit_form, "#upload_tag_string, #post_tag_string");
}

if ($("#c-uploads").length) {
this.initialize_image();
this.initialize_similar();
Expand All @@ -40,13 +36,6 @@ Upload.initialize_all = function() {
}
}

Upload.submit_form = async function(event) {
event.preventDefault();
Utility.notice("The Enter shortcut will be removed soon. Use Ctrl+Enter instead");
await Utility.delay(3000);
Shortcuts.submit_form(event);
}

Upload.initialize_submit = function() {
$("#form").on("submit.danbooru", Upload.validate_upload);
}
Expand Down

0 comments on commit 3486167

Please sign in to comment.