Edit tags in the middle of input
This commit is contained in:
parent
54379b98e0
commit
fe7edb93ad
9 changed files with 42 additions and 19 deletions
|
|
@ -1,12 +1,14 @@
|
|||
<input
|
||||
class="tags"
|
||||
type="text"
|
||||
id="search-tags"
|
||||
name="tags"
|
||||
hx-post="/search_tags"
|
||||
hx-trigger="input changed delay:400ms"
|
||||
hx-trigger="input changed"
|
||||
hx-target="next .tags-autocomplete"
|
||||
hx-swap="innerHTML"
|
||||
hx-vals="js:{selection_end: event.target.selectionEnd}"
|
||||
hx-on::after-settle="this.focus(); this.setSelectionRange(-1, -1);"
|
||||
value="{{ tags }}"
|
||||
autofocus
|
||||
/>
|
||||
<ul class="tags-autocomplete" hx-swap-oob="outerHTML:.tags-autocomplete"></ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue