From 0241032f061ba9fdc2ba5edd00ad92f945b10c70 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Wed, 4 Oct 2023 09:08:10 +0100 Subject: [PATCH] Tags: Fixed enter press clearing field For #4570 --- resources/js/components/auto-suggest.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/js/components/auto-suggest.js b/resources/js/components/auto-suggest.js index 92a6c6af3..2eede241c 100644 --- a/resources/js/components/auto-suggest.js +++ b/resources/js/components/auto-suggest.js @@ -31,7 +31,10 @@ export class AutoSuggest extends Component { }, event => { event.preventDefault(); - this.selectSuggestion(event.target.textContent); + const selectionValue = event.target.textContent; + if (selectionValue) { + this.selectSuggestion(selectionValue); + } }, ); navHandler.shareHandlingToEl(this.input);