From d771f6f41b80ed9af84b30586ccd634e398658b6 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 13 Oct 2021 03:52:41 -0500 Subject: [PATCH] autocomplete: remove old enter key workaround. Remove an old workaround designed to prevent pressing the Enter key in autocomplete from submitting the upload or tag edit. --- app/javascript/src/javascripts/autocomplete.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/javascript/src/javascripts/autocomplete.js b/app/javascript/src/javascripts/autocomplete.js index b0da16fea..b573a7fda 100644 --- a/app/javascript/src/javascripts/autocomplete.js +++ b/app/javascript/src/javascripts/autocomplete.js @@ -81,12 +81,6 @@ Autocomplete.initialize_tag_autocomplete = function() { $fields_multiple.autocomplete({ select: function(event, ui) { - // Prevent Upload.initialize_enter_on_tags from running if the - // Enter key is used to select a tag from the autocomplete menu. - if (event.key === "Enter") { - event.stopImmediatePropagation(); - } - Autocomplete.insert_completion(this, ui.item.value); return false; },