Skip to content

autofocus: Does not work on component 2nd time even when using API correctly #383

@nikivdev

Description

@nikivdev

Using latest version of @solid-primitives/autofocus.

I am trying to use it in this project.

In theory I am doing exactly the same thing as the docs say.

Here is the component.

Ref and createAutofocus here.

Then put it on input here.

However when you load the app and press the plus button on the bottom, it will only autofocus the first time. The second time you press it, it will just do this:

image

I am not sure what's wrong. The weirdest thing though is that if I activate it through keyboard (press n key), it will always autofocus. I have no idea why.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions