Skip to content

Create a restore-focus option for progressively-enhanced GET forms  #7895

@arackaf

Description

@arackaf

Describe the problem

There's an amazing, brand new feature whereby GET forms can now be progressively enhanced, which means we can use them to navigate to new search results, with less code, that will even work without JavaScript. This is a huge win. Unfortunately there's still one shortcoming: there's no way to have focus restored after the navigation.

In other words, type into the textbox, hit enter, have the new results show up, but also have focus restore into the same textbox

Describe the proposed solution

I guess there's be a data-sveltekit-restore-focus attribute?

Alternatives considered

n/a

Importance

would make my life easier - I think this feature (progressively enhanced GET forms) is severely hampered without this.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    formsStuff relating to forms and form actions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions