-
Notifications
You must be signed in to change notification settings - Fork 47
Use getAttribute when soft matching ids. #131
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
Conversation
|
Hey @dombesz , thanks for the PR! A couple of notes before I review:
|
ae36057 to
25001df
Compare
|
Hi @botandrose , thanks for the quick feedback, the CI should be green now. |
Some javascript frameworks like angular can overwrite the tag's id
getter, and comparison can turn into a false negative. Newly added
elements don't have the framework's code initialised yet, and calling id
on those elements can differ from the id assigned via angular. Since
there is no way to have frameworks initialized on the new elements,
calling the uid=501(dombesz) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),702(com.apple.sharepoint.group.2),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae) can be inconsistent. Using getAttribute("id") ensures
that we always compare the html id attributes.
Lint changes
|
Hi @botandrose can you please have a look at this PR? |
|
@dombesz Hello! Thank you for your time and effort here, and sorry for the long wait on this! The problem you pointed out turned out to be more widespread than javascript frameworks like Angular... its an issue with the DOM API itself! Take a look at #135 and #136 for more details. I expect #136 will resolve this as well, do you agree? Can you test the branch in your app to verify? I'm going to run this branch in production on my app for the next week, and if all looks well, I'll push a bugfix release next sunday. |
|
closing in favor of #136 |
|
Hi @botandrose , yes I believe the issue is solved by your PR as well. Thanks! |
|
@dombesz great! I'm glad to hear that. FYI, I've found another unrelated bug that I want to get into the next bugfix release, so contrary to what I wrote last Sunday, I expect to cut a bugfix release NEXT Sunday now. |
This should now be fixed. See bigskysoftware/idiomorph#131
This should now be fixed. See bigskysoftware/idiomorph#131 Co-Authored-By: Behrokh Satarnejad <62008897+bsatarnejad@users.noreply.github.com>
This should now be fixed. See bigskysoftware/idiomorph#131
Remove workaround for Idiomorph bug from date-pickers. The issue should now be fixed. See bigskysoftware/idiomorph#131 This reverts commit 46e4bf1.
Remove workaround for Idiomorph bug from date-pickers. The issue should now be fixed. See bigskysoftware/idiomorph#131 This reverts commit 46e4bf1.
Some javascript frameworks like angular can overwrite the tag's id getter, and comparison can turn into a false negative. Newly added elements don't have the framework's code initialised yet, and calling id on those elements can differ from the id assigned via angular. Since there is no way to have frameworks initialised on the new elements, calling the
idcan be inconsistent. UsinggetAttribute("id")ensures that we always compare the html id attributes.See this issue for more details: #130