mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Use Autocomplete on TagInput again
This commit is contained in:
parent
cda5e44786
commit
68bbc8d25d
1 changed files with 6 additions and 9 deletions
|
@ -40,7 +40,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
}
|
||||
|
||||
function decideNextActive() {
|
||||
console.log("dna", active, activeAfterBlur, JSON.stringify(tags));
|
||||
console.log("dna", active, activeAfterBlur);
|
||||
active = activeAfterBlur;
|
||||
activeAfterBlur = null;
|
||||
}
|
||||
|
@ -218,14 +218,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
id={tag.id}
|
||||
bind:name={tag.name}
|
||||
bind:input
|
||||
on:focus={() =>
|
||||
console.log(
|
||||
"focused",
|
||||
tag,
|
||||
tag.name,
|
||||
JSON.stringify(tags)
|
||||
)}
|
||||
on:blur={decideNextActive}
|
||||
on:keydown={updateAutocomplete}
|
||||
on:blur={() => {
|
||||
destroyAutocomplete();
|
||||
decideNextActive();
|
||||
}}
|
||||
on:tagsplit={({ detail }) =>
|
||||
splitTag(tag, index, detail.start, detail.end)}
|
||||
on:tagadd={() => insertTag(tag, index)}
|
||||
|
|
Loading…
Reference in a new issue