]>
BookStack Code Mirror - bookstack/commitdiff
projects
/
bookstack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
bd7c7eb
)
Tags: Fixed enter press clearing field
author
Dan Brown
<redacted>
Wed, 4 Oct 2023 08:08:10 +0000
(09:08 +0100)
committer
Dan Brown
<redacted>
Wed, 4 Oct 2023 08:08:10 +0000
(09:08 +0100)
For #4570
resources/js/components/auto-suggest.js
patch
|
blob
|
history
diff --git
a/resources/js/components/auto-suggest.js
b/resources/js/components/auto-suggest.js
index 92a6c6af3f43fde8ff5288c460f92c76eab31650..2eede241c694dc323f53ff33070163de2a79cea4 100644
(file)
--- 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);