Skip to content

Conversation

@dombesz
Copy link

@dombesz dombesz commented Mar 11, 2025

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 id can be inconsistent. Using getAttribute("id") ensures that we always compare the html id attributes.

See this issue for more details: #130

@botandrose
Copy link
Collaborator

Hey @dombesz , thanks for the PR! A couple of notes before I review:

  1. Don't modify the files in dist/, we rebuild these only just before a release.
  2. Can you get CI green? You can do a simulation locally with npm test:ci. More details in TESTING.md

@dombesz dombesz force-pushed the fix-node-matching branch from ae36057 to 25001df Compare March 11, 2025 21:02
@dombesz
Copy link
Author

dombesz commented Mar 11, 2025

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
@dombesz
Copy link
Author

dombesz commented May 12, 2025

Hi @botandrose can you please have a look at this PR?

@botandrose
Copy link
Collaborator

@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.

@botandrose
Copy link
Collaborator

closing in favor of #136

@botandrose botandrose closed this Jul 27, 2025
@dombesz
Copy link
Author

dombesz commented Jul 27, 2025

Hi @botandrose , yes I believe the issue is solved by your PR as well. Thanks!

@dombesz dombesz deleted the fix-node-matching branch July 27, 2025 15:10
@botandrose
Copy link
Collaborator

@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.

myabc added a commit to opf/openproject that referenced this pull request Sep 11, 2025
myabc added a commit to opf/openproject that referenced this pull request Sep 11, 2025
This should now be fixed.

See bigskysoftware/idiomorph#131

Co-Authored-By: Behrokh Satarnejad <62008897+bsatarnejad@users.noreply.github.com>
myabc added a commit to opf/openproject that referenced this pull request Sep 11, 2025
myabc added a commit to opf/openproject that referenced this pull request Sep 11, 2025
Remove workaround for Idiomorph bug from date-pickers. The issue should
now be fixed.

See bigskysoftware/idiomorph#131

This reverts commit 46e4bf1.
myabc added a commit to opf/openproject that referenced this pull request Sep 12, 2025
Remove workaround for Idiomorph bug from date-pickers. The issue should
now be fixed.

See bigskysoftware/idiomorph#131

This reverts commit 46e4bf1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants