Skip to content

Form with id field #135

@kobutri

Description

@kobutri

Here is a kind of fun bug.
line 477:

/ If oldElt has an `id` with possible state and it doesn't match newElt.id then avoid morphing.
// We'll still match an anonymous node with an IDed newElt, though, because if it got this far,
// its not persistent, and new nodes can't have any hidden state.
(!oldElt.id || oldElt.id === newElt.id)

When oldElt or newElt is a form element with an input field that has name="id", then elt.id will return the input field.
This should probably be !oldElt.getAttribute("id") || oldElt.t.getAttribute("id") === newEltt.getAttribute("id")

Edit: Clarified that it's elt.id not elt.input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions