-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use getAttribute to find duplicate ids, not the id property #880
Use getAttribute to find duplicate ids, not the id property #880
Conversation
Happy to adjust if requested 👍 |
disregard approval! accident... (thanks for all your hardwork on this though!) |
Ha! No worries! 👍 |
be3ff38
to
3bfd3a6
Compare
Incidentally, if anyone is able to discuss with me (or point to somewhere I can ask appropriately) about how I can make |
This feels related to #1037. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afcapel @kevinmcconnell could you enable CI to run for this PR?
Are folks happy enough with a force push here for me to correct the conflicts, or is a new commit preferred? |
@seanpdoyle I don't think I can run the CI due to the merge conflicts. @ethancrawford force push is ok. Re. using a custom version of Turbo I think your best option is build the branch yourself and vendor the resulting dist file in your app. You can remove the vendored file once there's a release with your changes. |
Sure, thanks! |
3bfd3a6
to
8c94c7c
Compare
@ethancrawford can you do rebase? Hopefully this can be merged soon |
Since form controls can be accessed in javascript directly by name through the form object, (e.g. `my_form.my_input`), `c.id` may end up referring to an _element_ whose name is `id`, instead of referring to the global id _attribute_. Explicitly retrieving the id with `getAttribute` avoids this.
8c94c7c
to
f0928ab
Compare
@brunoprietog done - apologies for not noticing the latest conflict sooner! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ethancrawford!
You're welcome! 👍 |
Since form controls can be accessed in javascript directly by name through the form object, (e.g.
my_form.my_input
),c.id
may end up referring to an element whose name isid
, instead of referring to the global id attribute. Explicitly retrieving the id withgetAttribute
avoids this.Fixes #879