Workaround autocomplete box sticking around after submitting.

This commit is contained in:
voussoir 2018-07-22 18:34:58 -07:00
parent 5ec38a93b1
commit cf9b6d0725
2 changed files with 7 additions and 2 deletions

View file

@ -89,8 +89,6 @@ Here is a brief overview of the project to help you learn your way around:
- Add a new table to store permanent history of add/remove of tags on photos, so that accidents or trolling can be reversed. - Add a new table to store permanent history of add/remove of tags on photos, so that accidents or trolling can be reversed.
- Fix album size cache when photo reload metadata and generally improve that validation. - Fix album size cache when photo reload metadata and generally improve that validation.
- Better bookmark url validation. - Better bookmark url validation.
- Create a textbox which gives autocomplete tag names.
- In the same vein, use a dedicated endpoint with etag caching for providing the full list of tag names, so the client can check up on it and store the results in localstorage, and use for the autocomplete system.
- Consider if the "did you commit too early" warning should actually be an exception. - Consider if the "did you commit too early" warning should actually be an exception.
- Extension currently does not believe in the override filename. On one hand this is kind of good because if they override the name to have no extension, we can still provide a downloadable file with the correct extension by remembering it. But on the other hand it does break the illusion of override_filename. - Extension currently does not believe in the override filename. On one hand this is kind of good because if they override the name to have no extension, we can still provide a downloadable file with the correct extension by remembering it. But on the other hand it does break the illusion of override_filename.
- When batch fetching objects, consider whether or not a NoSuch should be raised. Perhaps a warningbag should be used. - When batch fetching objects, consider whether or not a NoSuch should be raised. Perhaps a warningbag should be used.

View file

@ -372,6 +372,13 @@ function add_searchtag(box, value, inputted_list, li_class)
box_li = box.parentElement; box_li = box.parentElement;
ul = box_li.parentElement; ul = box_li.parentElement;
ul.insertBefore(new_li, box_li); ul.insertBefore(new_li, box_li);
// The datalist autocomplete box can sometimes stick around after the
// tag has already been submitted and the input box moves down -- now
// covered by the autocomplete. So we temporarily unfocus it to make
// that thing go away.
box.blur();
box.focus();
} }
} }
function remove_searchtag(li_member, value, inputted_list) function remove_searchtag(li_member, value, inputted_list)