Skip to content

Binding focus state to elements #8949

Closed
@Maximinodotpy

Description

@Maximinodotpy

Describe the problem

I hope i'm not missing something but it would be cool if we were able to bin variables to focusable elements abd find out this way if there focused or not, furthermore if we set this bound variable to true it should focus this element and blur in case its turned to false.

Describe the proposed solution

A property like this bind:focused

Alternatives considered

Using the focus and blur functions for focusable elements and the activeElement property of the document.

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestgood first issueA small, encapsulated issue, ideal for a new contributor to Svelte to tackle.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions