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 transform to not touch native <input> #79

Merged
merged 1 commit into from
Aug 2, 2019

Conversation

simonihmig
Copy link
Contributor

@simonihmig simonihmig commented Aug 2, 2019

Fixes #78

That was a pretty stupid one: the transform would treat <input /> the same as <Input />, i.e. transform it to {{input}}. 🤦‍♂️
Fixed that, added a test, and also tested it with the test suite of ember-bootstrap, which uncovered this issue as reported in #78.

Had to extract some of the existing helpers that work around the issue of earlier Ember version's AST returning the lower-cased tag name, to reuse them here.

Fixes ember-polyfills#78

That was a pretty stupid one: the transform would treat `<input />` the same as `<Input />`, i.e. transform it to `{{input}}`. 🤦‍♂️
Fixed that, added a test, and also tested it with the test suite of ember-bootstrap, which uncovered this issue as reported in ember-polyfills#78.

Had to extract some of the existing helpers that work around the issue of earlier Ember version's AST returning the lower-cased tag name, tu reuse them here.
@@ -104,15 +108,15 @@ class AngleBracketInputPolyfill {

let visitor = {
ElementNode(node) {
let tag = node.tag.toLowerCase();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the culprit, which I copy pasted blindly from the link-to transform, which does not work here obviously 🙈
Sorry about that!

@rwjblue rwjblue added the bug Something isn't working label Aug 2, 2019
@rwjblue rwjblue merged commit da45883 into ember-polyfills:master Aug 2, 2019
@rwjblue
Copy link
Member

rwjblue commented Aug 2, 2019

Thanks for digging into this!

@simonihmig simonihmig deleted the fix-input branch August 3, 2019 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regressions of v2.0.0
2 participants