Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($compile): call normalize on nodes for cases when browser creates ... #7450

Closed
wants to merge 3 commits into from
Closed

Conversation

stephenjudkins
Copy link

Request Type: bug

How to reproduce: Occurs sporadically in the wild, but the included test synthesizes exactly what happens when it does.

Component(s): $compile

Impact: small

Complexity: small

This issue is related to:

Detailed Description:

Other Comments:

...multiple text nodes when parsing HTML

When IE 11 parses HTML, it occasionally splits text into adjacent sibling text nodes. It's difficult to reproduce, but we have some screenshots of it happening: https://dl.dropboxusercontent.com/spa/4slnjubp16y5phq/3f-ld80p.png

While this is illegal according to the DOM spec, it happens anyways and should be dealt with. Angular currently can't deal with this.

Calling normalize when compiling a node addresses this issue. Test included.

@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#7450)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@stephenjudkins
Copy link
Author

Could you hold off on merging this for now? It appears in some cases, IE11 does not honor the normalize call. I'm digging deeper after lunch.

@mary-poppins
Copy link

I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let us know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@mary-poppins
Copy link

CLA signature verified! Thank you!

Someone from the team will now triage your PR and it will be processed based on the determined priority (doc updates and fixes with tests are prioritized over other changes).

@stephenjudkins
Copy link
Author

I've added a change that now reliably fixes this issue in IE11. Outside of our client's proprietary app, I haven't been able to produce this bug reliably. I'm probably not going to spend much more time on this since we've fixed this locally, and I don't plan on using Angular again. If you have any questions about this, I'm happy to answer them.

If someone else has this problem and wants a quick fix, and Angular devs don't merge these fixes, here's what we're using:
https://gist.github.com/stephenjudkins/801de2af854245e9f14f

Good luck!

@Narretz
Copy link
Contributor

Narretz commented Feb 14, 2017

Looks like this was fixed here #15025

@Narretz Narretz closed this Feb 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants