diff --git a/frontends/etiquette_flask/static/js/common.js b/frontends/etiquette_flask/static/js/common.js index 9f425d7..8226200 100644 --- a/frontends/etiquette_flask/static/js/common.js +++ b/frontends/etiquette_flask/static/js/common.js @@ -321,6 +321,17 @@ function init_enable_on_pageload() } } +common.init_entry_with_history = +function init_entry_with_history() +{ + const inputs = Array.from(document.getElementsByClassName("entry_with_history")); + for (const input of inputs) + { + input.addEventListener("keyup", common.entry_with_history_hook); + input.classList.remove("entry_with_history"); + } +} + common.init_tabbed_container = function init_tabbed_container() { @@ -395,6 +406,7 @@ function on_pageload() common.init_atag_merge_params(); common.init_button_with_confirm(); common.init_enable_on_pageload(); + common.init_entry_with_history(); common.init_tabbed_container(); } document.addEventListener("DOMContentLoaded", common.on_pageload); diff --git a/frontends/etiquette_flask/static/js/tag_autocomplete.js b/frontends/etiquette_flask/static/js/tag_autocomplete.js index 29b61e9..9b7a6cd 100644 --- a/frontends/etiquette_flask/static/js/tag_autocomplete.js +++ b/frontends/etiquette_flask/static/js/tag_autocomplete.js @@ -64,6 +64,17 @@ function entry_with_tagname_replacements_hook(event) } } +tag_autocomplete.init_entry_with_tagname_replacements = +function init_entry_with_tagname_replacements() +{ + const inputs = Array.from(document.getElementsByClassName("entry_with_tagname_replacements")); + for (const input of inputs) + { + input.addEventListener("keyup", tag_autocomplete.entry_with_tagname_replacements_hook); + input.classList.remove("entry_with_tagname_replacements"); + } +} + tag_autocomplete.resolve = function resolve(tagname) { @@ -111,5 +122,6 @@ tag_autocomplete.on_pageload = function on_pageload() { tag_autocomplete.update_tagset(); + tag_autocomplete.init_entry_with_tagname_replacements(); } document.addEventListener("DOMContentLoaded", tag_autocomplete.on_pageload); diff --git a/frontends/etiquette_flask/templates/clipboard.html b/frontends/etiquette_flask/templates/clipboard.html index 8a2ac7a..62ac71b 100644 --- a/frontends/etiquette_flask/templates/clipboard.html +++ b/frontends/etiquette_flask/templates/clipboard.html @@ -108,12 +108,12 @@