obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.5k stars 231 forks source link

In both Live Preview and Source mode, any time the auto-suggest menu is open, Tab key presses (to indent the line) are ignored #1578

Closed kellyelton closed 1 year ago

kellyelton commented 1 year ago

Please check that this issue hasn't been reported before.

Expected Behavior

I would expect that you could type a task, press enter, and then press tab to indent the next item.

So if I have the task list

I would expect that after typing 'Task C' and pressing enter, I could then press tab to indent the next item

Current behaviour

Currently when you press enter, a new checkbox is created, and the dropdown shows up, but pressing 'Tab' does nothing.

Sometimes pressing 'Esc' to close the dropdown will let you indent, sometimes it won't.

Steps to reproduce

Create a task Press enter Try to indent by pressing tab

Which Operating Systems are you using?

Obsidian Version

1.1.9

Tasks Plugin Version

1.22.0

Checks

Possible solution

No response

claremacrae commented 1 year ago

Odd. It does work on Mac.

Unfortunately I don't have convenient access to a PC to investigate.

What other information can you think of, though, to make the description more complete and unambiguous?

For example, you don't say whether you are in Source or Live Preview mode.

Although having said that, it works for me in both.

Please supply a screenshot of your Tasks settings.

Please run the Show debug info command in Obsidian, click on Copy to clipboard then paste the results in here.

Then click on the Sandbox vault button in that Debug info window, and see if the same problem happens.

GeorgeGo commented 1 year ago

I'm not sure the best way for me to add information to this but I also have the reported issue, though I'm on mac. The issue appears to be the 'enter, due date, etc...' modal is eating my tab key presses.

System: Mac Mode: Live Preview

SYSTEM INFO: Obsidian version: v1.1.12 Installer version: v0.15.9 Operating system: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 22.1.0 Login status: logged in Catalyst license: insider Insider build toggle: on Live preview: on Legacy editor: off Base theme: dark Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 3 Plugins enabled: 2 1: Task Collector (TC) v1.0.3 2: Tasks v1.23.0

RECOMMENDATIONS: Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

claremacrae commented 1 year ago

Hi @GeorgeGo,

The issue appears to be the 'enter, due date, etc...' modal is eating my tab key presses.

I don’t see how you that modal can be open and you be able to edit a document in the way described in this issue’s first post.

Please could you try to create a detailed, minimal list of steps that reproduce what you see.

Like:

  1. Start Obidian
  2. Set the Tasks settings to ….
  3. Restart Obsidian
  4. Create a note with exactly this text ‘….’
  5. Switch to (whatever mode you observe the problem in)
  6. Click just before the ….. character
  7. Etc

That’s the sort of level of detail needed to be able to reproduce a bug and address it.

Alternatively, you could create a video of the problem happening, showing it step by step. That might be easier to do.

GeorgeGo commented 1 year ago

Does this video help illustrate the issue? The settings are the same as listed above in this test vault.

https://user-images.githubusercontent.com/2007729/214915731-69a0cdae-0d00-4109-9788-8f922fd997d9.mov

I'm not sure the best way for me to add information to this but I also have the reported issue, though I'm on mac. The issue appears to be the 'enter, due date, etc...' modal is eating my tab key presses.

System: Mac Mode: Live Preview

SYSTEM INFO: Obsidian version: v1.1.12 Installer version: v0.15.9 Operating system: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 22.1.0 Login status: logged in Catalyst license: insider Insider build toggle: on Live preview: on Legacy editor: off Base theme: dark Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 3 Plugins enabled: 2 1: Task Collector (TC) v1.0.3 2: Tasks v1.23.0

RECOMMENDATIONS: Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

claremacrae commented 1 year ago

Yes it does help - when you said modal, I thought you were referring to the Edit Task modal that pops up a dialog.

The only remaining question is whether what you are describing is the same situation as the original message in this issue...

@kellyelton Please would you watch the video above and report whether it's the same thing you are seeing.

@GeorgeGo I'll leave it a day or two, and If I still don't get a reply, I will just edit this ticket and repurpose it to fit what you have demoed.

GeorgeGo commented 1 year ago

Appreciate it! Is modal not the right term for that window?

claremacrae commented 1 year ago

It doesn't matter. The main thing is the video makes it clear.

FWIW The docs seem to call it the "the auto-suggest menu" https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/auto-suggest/

GeorgeGo commented 1 year ago

Appreciate it! Thanks for the clarification.

loiccattani commented 1 year ago

To further clarify, in Live Preview:

Here on Obsidian 1.1.16, with Tasks 1.25.0 on macOS

claremacrae commented 1 year ago

To further clarify, in Live Preview:

Excellent - that's really clear. Thank you.

anpalcactus commented 1 year ago

Any news on this one? I can confirm that it doesn’t work in iPadOS (using key press Tab on Smart Keyboard). Live Preview Mode.

Steps to reproduce as mentioned above by other users.

claremacrae commented 1 year ago

@anpalcactus If there were any news, it would already be in this ticket.

claremacrae commented 1 year ago

I was just looking for bugs that might be easy to investigate, and so had a look at this.

I've just spent an hour or so debugging this to find out what is going on, and to try to find a workaround.

I also looked at another plugin - Numerals - that uses suggesters and found it has the same behaviour.

I've made no progress. So I've added the help wanted label, and below is what I have found out so far.

CamerAllan commented 1 year ago

I just upgraded this plugin to a version that supports the suggestion popup and had to turn it off due to this issue getting in my way!

I've created a forum thread about this, as I agree with @claremacrae that the issue appears to be with the implementation of EditorSuggest in core Obsidian.

claremacrae commented 1 year ago

If anyone is willing to test the fix for this, you can download a build of the plugin with @CamerAllan's fix.

(Testing is a great way for non-developers to contribute to the Tasks plugin, and is greatly appreciated ❤️ !)

  1. Create a test vault
  2. Get Obsdian to create the Tasks plugin folder for you, by:
    1. Go to Settings -> Community plugins
    2. Install the Tasks plugin
    3. Click on the folder icon, to open the plugins folder in your file browser/explorer/finder...: image
    4. Open the obsidian-tasks-plugin folder
  3. Install the test build in to that obsidian-tasks-plugin folder, by:
    1. Download dist-verified.zip
    2. Expand the download file
    3. Copy the expanded files in to the folder opened obsidian-tasks-plugin folder
  4. Restart Obsidian

Now test away...

Try to be creative - think about scenarios that might go wrong... Like maybe having multiple windows open in Obsidian

If you do test it, please tell us how you tested it (what platform; any ways you tried to break it, etc) and note any feedback - good or bad - in #2362...

Just knowing that others have tested it is very valuable.

Many thanks!

CamerAllan commented 1 year ago

Bump on the above - would really appreciate someone else taking time to test this out so we can get it fixed for everyone!

loiccattani commented 1 year ago

Hi, finally got the time to follow these directions in a test vault.

This issue indeed seems to be fixed ! (tested on macOS, with or whithout autosuggest turned on, changing the number of minimum characters for a match. Single or multiple vaults open. No issues.)

Thank you !

CamerAllan commented 1 year ago

Thanks for taking the time @loiccattani - I really appreciate it 🙂