mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 23:27:12 -05:00
Make TagAddButton focusable and simulate click on focus (#1838)
This commit is contained in:
parent
c8a4e5ea22
commit
1ec227d926
1 changed files with 7 additions and 1 deletions
|
|
@ -13,13 +13,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
|
||||
const dispatch = createEventDispatcher<{ tagappend: CustomEvent<void> }>();
|
||||
|
||||
function appendTag() {
|
||||
dispatch("tagappend");
|
||||
}
|
||||
|
||||
const keyCombination = "Control+Shift+T";
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="tag-add-button"
|
||||
title="{tr.editingTagsAdd()} ({getPlatformString(keyCombination)})"
|
||||
on:click={() => dispatch("tagappend")}
|
||||
tabindex={0}
|
||||
on:click={appendTag}
|
||||
on:focus={appendTag}
|
||||
>
|
||||
<IconConstrain>
|
||||
{@html tagIcon}
|
||||
|
|
|
|||
Loading…
Reference in a new issue