From 79df27b72cbd5127d069247bacfb24a3adba4178 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Wed, 22 Oct 2025 21:04:08 -0400 Subject: [PATCH] Autocomplete placeholder now replaces spaces in input value with unicode non-breaking space character. --- www/js/channel/chat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/js/channel/chat.js b/www/js/channel/chat.js index e733bdf..5311fb5 100644 --- a/www/js/channel/chat.js +++ b/www/js/channel/chat.js @@ -278,11 +278,11 @@ class chatBox{ //Find current match const match = this.checkAutocomplete(); + //Set placeholder to space out the autocomplete display - //Use text content because it's unescaped, and while this only effects local users, it'll keep someone from noticing and whinging about it - this.autocompletePlaceholder.textContent = this.chatPrompt.value; + this.autocompletePlaceholder.innerText = this.chatPrompt.value.replaceAll(" ","\u00A0"); //Set the autocomplete display - this.autocompleteDisplay.textContent = match.match.replace(match.word, ''); + this.autocompleteDisplay.innerText = match.match.replace(match.word, ''); } /**