Skip to content

One-page form opens with focus on a picked note's remove button #2110

Description

@chhoumann

A one-page form whose first field is a file picker with a note already picked opens with the keyboard focus on that note's remove button (×). This is now every one-page capture to a folder, tag or property: since #1955 the Capture to field comes first, and since #2099 it is a file picker that starts with the first note picked.

So on desktop:

  • Typing the capture text right away goes nowhere.
  • Enter or Space removes the picked note, and the field's note list opens over the form.

In 2.29.0 the same choice opened with the cursor in the capture text field, ready to type.

Steps

  1. Create a Capture with Capture to People/, Capture format - {{VALUE:note}}, and one-page input Always.
  2. Run it from the command palette or a hotkey.
  3. Press Enter, or start typing.

Expected

The form opens ready for the first answer it still needs, here the note field, as in 2.29.0.

Actual

Focus is on Remove Thomas Anderson. Enter removes the note.

Master:

focus on the remove button

2.29.0:

focus in the note field

{{FILE:}} fields with a picked note had the same first focus in 2.29.0, but only when one came first in the form.

Cause

Obsidian focuses the first focusable element in a modal after onOpen. In a file picker holding a note, that is the chip's remove button.

Obsidian 1.13.7, QuickAdd master fcb315d.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions