Skip to content

[Bugfix] Fix references to element.id#1563

Merged
1cg merged 1 commit intobigskysoftware:devfrom
Telroshan:fix-id-references
Jul 22, 2023
Merged

[Bugfix] Fix references to element.id#1563
1cg merged 1 commit intobigskysoftware:devfrom
Telroshan:fix-id-references

Conversation

@Telroshan
Copy link
Collaborator

This fixes #1496

Typing formElement.anything returns all inputs declaring that anything as their name, as an object or an array if there are several of them. You can observe this behaviour in this JSFiddle
This causes the mentioned issue in htmx when accessing an element's ID with a direct element.id call, as for a form, this would return all inputs using name="id"

  • You can see the bugged behavior of the current htmx state in this JSFiddle provided by the issue's OP
  • You can then see the behaviour you would expect with the suggested changes in this JSFiddle

@alexpetros alexpetros added bug Something isn't working ready for review Issues that are ready to be considered for merging labels Jul 17, 2023
@1cg 1cg merged commit a29403f into bigskysoftware:dev Jul 22, 2023
@Telroshan Telroshan deleted the fix-id-references branch September 22, 2023 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready for review Issues that are ready to be considered for merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants