typeahead: Use text() instead of html() in set_value.

This particular codepath is never reached right now,
because set_value is only called when `naturalSearch`
is `true`, and the only instance of `naturalSearch`
isn't for a `contenteditable` field.

But we don't need to use `html()` here because it's
displaying a plain string typeahead option.
This commit is contained in:
evykassirer 2024-03-10 11:33:02 -07:00 committed by Tim Abbott
parent 099810e80f
commit 60018dfd12
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ Typeahead.prototype = {
set_value() { set_value() {
const val = this.$menu.find(".active").data("typeahead-value"); const val = this.$menu.find(".active").data("typeahead-value");
if (this.$element.is("[contenteditable]")) { if (this.$element.is("[contenteditable]")) {
this.$element.html(val); this.$element.text(val);
} else { } else {
this.$element.val(val); this.$element.val(val);
} }