Skip to content

Commit 9c6a152

Browse files
committed
fix: Fix accelerator key for 'Blocked By' field in Edit Task
Previously just the shortcut for 'Blocking' worked in Dependency.svelte
1 parent cf6ff2b commit 9c6a152

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/ui/Dependency.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
export let _onDescriptionKeyDown: (e: KeyboardEvent) => void;
1010
export let type: "blocking" | "blockedBy";
1111
export let accesskey: (key: string) => string | null;
12+
export let accesskeyLetter: string = '';
1213
1314
const MAX_SEARCH_RESULTS = 20;
1415
@@ -173,7 +174,7 @@
173174
on:keydown={(e) => taskKeydown(e)}
174175
on:focus={onFocused}
175176
on:blur={() => inputFocused = false}
176-
accesskey={accesskey("b")}
177+
accesskey={accesskey(accesskeyLetter)}
177178
id="{type}"
178179
class="input"
179180
type="text"

src/ui/EditTask.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,14 +599,14 @@
599599
<!-- --------------------------------------------------------------------------- -->
600600
<label for="start">Blocked B<span class="accesskey">y</span></label>
601601
<Dependency type="blockedBy" task={task} editableTask={editableTask} allTasks={allTasks}
602-
_onDescriptionKeyDown={_onDescriptionKeyDown} accesskey={accesskey} />
602+
_onDescriptionKeyDown={_onDescriptionKeyDown} accesskey={accesskey} accesskeyLetter="y" />
603603

604604
<!-- --------------------------------------------------------------------------- -->
605605
<!-- Blocking Tasks -->
606606
<!-- --------------------------------------------------------------------------- -->
607607
<label for="start" class="accesskey-first">Blocking</label>
608608
<Dependency type="blocking" task={task} editableTask={editableTask} allTasks={allTasks}
609-
_onDescriptionKeyDown={_onDescriptionKeyDown} accesskey={accesskey} />
609+
_onDescriptionKeyDown={_onDescriptionKeyDown} accesskey={accesskey} accesskeyLetter="B" />
610610
{:else}
611611
<div><i>Blocking and blocked by fields are disabled when vault tasks is empty</i></div>
612612
{/if}

0 commit comments

Comments
 (0)