mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-18 06:57:59 +01:00
Restore -
prefix when sending autocomplete from mouse clicks
This commit is contained in:
parent
ea69049e21
commit
5c8ae5f54b
1 changed files with 5 additions and 1 deletions
|
@ -232,8 +232,12 @@ function listenAutocomplete() {
|
|||
const originalSuggestion = event.detail;
|
||||
applySelectedValue(originalSuggestion.value);
|
||||
|
||||
if (originalTerm?.startsWith('-')) {
|
||||
originalSuggestion.value = `-${originalSuggestion.value}`;
|
||||
}
|
||||
|
||||
inputField.dispatchEvent(
|
||||
new CustomEvent('autocomplete', {
|
||||
new CustomEvent<TermSuggestion>('autocomplete', {
|
||||
detail: Object.assign(
|
||||
{
|
||||
type: 'click',
|
||||
|
|
Loading…
Reference in a new issue