mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 15:47: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> }>();
|
const dispatch = createEventDispatcher<{ tagappend: CustomEvent<void> }>();
|
||||||
|
|
||||||
|
function appendTag() {
|
||||||
|
dispatch("tagappend");
|
||||||
|
}
|
||||||
|
|
||||||
const keyCombination = "Control+Shift+T";
|
const keyCombination = "Control+Shift+T";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="tag-add-button"
|
class="tag-add-button"
|
||||||
title="{tr.editingTagsAdd()} ({getPlatformString(keyCombination)})"
|
title="{tr.editingTagsAdd()} ({getPlatformString(keyCombination)})"
|
||||||
on:click={() => dispatch("tagappend")}
|
tabindex={0}
|
||||||
|
on:click={appendTag}
|
||||||
|
on:focus={appendTag}
|
||||||
>
|
>
|
||||||
<IconConstrain>
|
<IconConstrain>
|
||||||
{@html tagIcon}
|
{@html tagIcon}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue