Skip to content

Issue with focus being lost on input beta7->beta8 #710

@MikeDepies

Description

@MikeDepies

This snippet below exposes a behavior change to the way inputs and merge fragments interact. In version beta7 and below, the focus would stay on the text input when a fragment came in. However in beta8, now it appears to lose focus on merge fragment. This is true for when a signal is bound to the input.

Snippet:

<body class="bg-gray-100 h-screen" id="body" data-on-load="@get(`/overview/sse`, {})">
    <div class="container mx-auto p-4" id="testing">
<div data-signals__ifmissing="{'test' : 'test'}" data-on-signals-change-test__debounce.20ms="@get(`/overview/search`, {})" id="datastar58uydy"><input data-bind-test  id="datastar8m3obv"></div>
</div>
</body>

Backend:
The backend can just send a merge fragment for this html.

Maybe I'm missing something here, but I tried to boil the problem down to the simplest example.

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