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 bugs caused by html-safe empty strings #791

Closed

Conversation

mongoose700
Copy link
Contributor

Adding empty strings as HTML leads to difficulties keeping track of
sibling nodes. It's easier to keep track of as text.

This fixes the issues emberjs/ember.js#14924 and emberjs/ember.js#16314. The first one could be solved by simply removing the if (html === null || html === '') special case. The latter issue cannot, because it would still need to deal with a null last node.

@rwjblue
Copy link
Member

rwjblue commented Mar 4, 2018

Awesome, thank you for digging into this!

Adding empty strings as HTML leads to difficulties keeping track of
sibling nodes. It's easier to keep track of as text.
@mongoose700 mongoose700 force-pushed the htmlsafe-empty-string branch from 5fa38ff to bed226f Compare March 5, 2018 01:01
@mongoose700
Copy link
Contributor Author

It seems to be failing some IE tests in CI, even though those tests don't even encounter my changes. Are they known to be flakey?

@rwjblue
Copy link
Member

rwjblue commented Mar 5, 2018

I’ll restart, I’m not sure if they are normally flakey or not...

@mongoose700 mongoose700 force-pushed the htmlsafe-empty-string branch from 16a46ee to bed226f Compare March 5, 2018 05:06
@mongoose700
Copy link
Contributor Author

It failed an IE test again. The previous version that used a text node also failed on that test some times, but passed other times. It may be a flake.

@rwjblue
Copy link
Member

rwjblue commented Mar 6, 2018

I kicked it once more...

@rwjblue
Copy link
Member

rwjblue commented Mar 6, 2018

Latest build had a single failure in IE11:

screenshot

@mongoose700
Copy link
Contributor Author

How do you normally go about debugging issues that only happen in IE?

@rwjblue
Copy link
Member

rwjblue commented Mar 6, 2018

The "easiest" thing would be to download an IE11 virtual machine (from modern.ie) and run the tests...

@mongoose700
Copy link
Contributor Author

mongoose700 commented Mar 13, 2018

I've run the tests on a virtual machine repeatedly, and they never fail locally. Though I'm using Windows 8, and CI is using Windows 10. I'll see if I can get a different VM.

@mongoose700
Copy link
Contributor Author

I've tried with Windows 10, and the test still passes. I switched to QUnit 2.0.0 to match what CI is using, and updated IE, which took me past the version used in CI. Is there a way I can use the exact same VM that CI is using?


screen shot 2018-03-13 at 12 52 20 am

chancancode added a commit that referenced this pull request Sep 24, 2018
@wycats wycats closed this in #852 Sep 25, 2018
@chancancode
Copy link
Contributor

@mongoose700 sorry this took so long! I merged in your changes in #852 and credited you for the commit. Would you mind opening a new PR to add the #each test you have here?

chancancode added a commit that referenced this pull request Sep 25, 2018
@mongoose700
Copy link
Contributor Author

Nice, thanks for getting those changes in! I was having a hard time getting it to pass the tests for IE.

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.

3 participants