Open swoh816 opened 11 months ago
Hi @swoh816, thank you for logging this. It's a new report, I've not seen it before.
I've edited the issue title to make it more specific.
I can confirm that this is reproducible on Mac.
Tasks: Create or edit task
to Ctrl + Opt + O
Ctrl + Opt + O
Expected: Priority is Normal
Actual: Priority is Lowest
I've no experience to know how to fix this, and because Obsidian allows user control of the shortcuts for commands like opening the Tasks modal, I'm afraid it's not a priority for me personally to fix it. There are other more widely applicable ways I can spend my time on Tasks.
I can think of the following workarounds:
Tasks: Create or edit task
to a key that is not used in this modal.I've added the 'help-wanted' label to this.
In case anyone with Svelte experience is interested in fixing this:
I've noted this limitation in the docs - see https://github.com/obsidian-tasks-group/obsidian-tasks/commit/698565706f8f90ee3f3f73235c2f3010cc0b393a.
This will be published as part of the next Tasks release.
I wonder whether the following code is anything to do with the problem:
And it's referenced on line 397 here:
I expect that:
Maybe there's a fix around having the modal keep track of key-down events as well as key-up ones - and only acting on the key-up if it had previously seen the key-down.
I can imagine that will lead to corner cases with issues of timing of typing, and will be rather hard to test reliably.
Please check that this issue hasn't been reported before.
Expected Behavior
'Create or edit Task' Modal shows Normal priority by default.
Current behaviour
If you set the shortcut for "Create or edit task" to
Alt + l
, the 'Create or edit Task' Modal pops up with the priority set to Low (which is set to Normal by default).This is generally applicable: If you set the shortcut for "Create or edit task" the same as the shortcut for any of the items inside the 'Create or edit Task' Modal, the modal opens with the item being affected. For example, if you set the shortcut for "Create or edit task" to
Alt + f
, which is a shortcut for "Only future dates" inside 'Create or edit Task' Modal, using the shortcut in the document opens the modal with "Only future dates" disabled. ("Only future dates" is enabled by default.)Thank you very much for the amazing plugin!
Steps to reproduce
Alt + l
Alt + l
to open 'Create or edit Task' ModalWhich Operating Systems are you using?
Obsidian Version
1.4.16
Tasks Plugin Version
5.2.0
Checks
Possible solution
Make shortcuts in the 'Create or edit Task' Modal active after the modal is loaded completely so that the modal's default behaviour is not affected by whatever shortcut was used for opening the modal.