Skip to content
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

fix: ci-2234 check for tagName for comparison #1683

Closed
wants to merge 1 commit into from

Conversation

debugwand
Copy link
Contributor

Describe your changes

This change allows us to apply delegation to an area of the page that applies a shadow root.

This checks for the existence of the tagName property on an element before running lowerCase() on it, as if this is undefined or null this will throw an error. If an element applies a shadow root, that will return as a document fragment when looping through the parent nodes, and these do not have the tagName property.

Issue ticket number and link

https://financialtimes.atlassian.net/jira/software/c/projects/CI/boards/1653?assignee=5be57e310e625003a46e9693&selectedIssue=CI-2234

Link to Figma designs

N/A

Checklist before requesting a review

  • I have applied percy label for o-[COMPONENT] or chromatic label for o3-[COMPONENT] on my PR before merging and after review. Find more details in CONTRIBUTING.md
  • If it is a new feature, I have added thorough tests.
  • I have updated relevant docs.
  • I have updated relevant env variables in Doppler.

@debugwand debugwand requested a review from a team as a code owner May 31, 2024 15:54
@origamiserviceuser origamiserviceuser added this to Backlog in Origami ✨ May 31, 2024
@debugwand
Copy link
Contributor Author

there are other problems that are triggered when attaching to a shadow root, so closing this. I'll find another way.

@debugwand debugwand closed this Jun 3, 2024
Origami ✨ automation moved this from Backlog to Done Jun 3, 2024
@debugwand debugwand deleted the ci-2234-delegate-shadowroot branch June 3, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Origami ✨
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant