TiddlyWiki / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
8.07k stars 1.19k forks source link

[IDEA] After creating a new field, focus the cursor on the "field name" #6713

Open catscratchedme opened 2 years ago

catscratchedme commented 2 years ago

Is your feature request related to a problem? Please describe. When I create a new field by entering the field name, field value, and then pressing enter, the cursor is not focused anywhere.

This makes it so I need to use my mouse to add another field or save the tiddler (the shortcut Ctrl+Enter doesn't work)

Sometimes, if I press tab, then the cursor will appear on the "field value" of the "Add a new field:" row, but then I would need to use shift-tab to bring the cursor back to "field name".

This happens in Firefox, Chromium-based browsers, and TiddlyDesktop.

Describe the solution you'd like Automatically focus the cursor onto the "field name" of the "Add a new field:" row after you add a field.

This makes it so you can keep your hands on the keyboard when:

Describe alternatives you've considered Another alternative is to focus the cursor onto the "field value" of the field you've just added, in case you want to edit it.

I feel like my proposed solution makes more sense for most workflows though.

Additional context image

Jermolene commented 2 years ago

Thanks @catscratchedme that sounds reasonable. @FlashSystems @BurningTreeC might one of you be able to kindly look at this?

FlashSystems commented 2 years ago

Hello @catscratchedme, thank you for taking the time to report this behaviour and suggesting a solution.

It is caused by a bug that was introduced by my change in PR #6511. It is already fixed on the master branch with commit e9405ac8109987caf0515828e5bae2417deae264.

The next release of TiddlyWiki will (again) behave as you suggested: After pressing enter to create a new field, the "field name" input element will be focused, and you can create the next field right away.

Jermolene commented 2 years ago

Doh, thank you @FlashSystems I didn't recognise that this was already fixed.

pmario commented 11 months ago

@catscratchedme -- IMO this issue can be closed. It should be fixed already.