mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -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() {
|
function decideNextActive() {
|
||||||
console.log("dna", active, activeAfterBlur, JSON.stringify(tags));
|
console.log("dna", active, activeAfterBlur);
|
||||||
active = activeAfterBlur;
|
active = activeAfterBlur;
|
||||||
activeAfterBlur = null;
|
activeAfterBlur = null;
|
||||||
}
|
}
|
||||||
|
@ -218,14 +218,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
id={tag.id}
|
id={tag.id}
|
||||||
bind:name={tag.name}
|
bind:name={tag.name}
|
||||||
bind:input
|
bind:input
|
||||||
on:focus={() =>
|
on:keydown={updateAutocomplete}
|
||||||
console.log(
|
on:blur={() => {
|
||||||
"focused",
|
destroyAutocomplete();
|
||||||
tag,
|
decideNextActive();
|
||||||
tag.name,
|
}}
|
||||||
JSON.stringify(tags)
|
|
||||||
)}
|
|
||||||
on:blur={decideNextActive}
|
|
||||||
on:tagsplit={({ detail }) =>
|
on:tagsplit={({ detail }) =>
|
||||||
splitTag(tag, index, detail.start, detail.end)}
|
splitTag(tag, index, detail.start, detail.end)}
|
||||||
on:tagadd={() => insertTag(tag, index)}
|
on:tagadd={() => insertTag(tag, index)}
|
||||||
|
|
Loading…
Reference in a new issue