emberjs / ember.js

Ember.js - A JavaScript framework for creating ambitious web applications
https://emberjs.com
MIT License
22.47k stars 4.21k forks source link

[Bug] Ember 3.20.4 template booleans' issues with IE11 #19305

Closed frykten closed 1 year ago

frykten commented 3 years ago

🐞 Describe the Bug

We tried upgrading our stack to the Ember current LTS 3.20.6 and while testing our app, we had some issues with some properties on our components on IE11. Setting a property from a .js file is good, but setting a property from a template creates the issue: booleans true and false are understood as string "true" and "false". It was "easy" to find with components relying on boolean properties passed from parents, which often is used for aria-attributes or style. A git bisect showed the 3.20.4 breaks it.

🔬 Minimal Reproduction

Couldn't reproduce on a new project. We don't have much intel on what is breaking what. Quick example: https://ember-twiddle.com/874f2d10377cfa25a527340fe563a9af Could be reproduced on our app with any component (here I imported an addon for popovers for the sake of going quickly and because it was our easiest broken component but had I done it with anything else, it still would have the same broken result).

😕 Actual Behavior

On IE11 only. When passing the boolean {{false}} as a property in templates, it is understood as the string "false", resulting in conditions turning out truthey when they shouldn't.

🤔 Expected Behavior

Should work as intended, I guess.

🌍 Environment

rwjblue commented 3 years ago

@frykten - Would you mind recreating the demo in a stand alone repo? Twiddle doesn't function in IE11, so I can test the demonstration to understand what is being reported here.

rwjblue commented 3 years ago

As far as I can tell, AttachPopover only uses the passed in isShown argument in its JavaScript (not in its templates).

https://github.com/kybishop/ember-attacher/blob/b6eb27c6f760e269012ea7b7173b97a0c5e91ebf/addon/components/attach-popover.js

https://github.com/kybishop/ember-attacher/blob/b6eb27c6f760e269012ea7b7173b97a0c5e91ebf/addon/templates/components/attach-popover.hbs


In general, I haven't seen / heard of this issue, so I'm really going to need a runnable demo in IE11 that works in Chrome (and is broken in the way reported in IE11).

sandstrom commented 1 year ago

I'm doing some issue gardening 🌱🌿 🌷 and came upon this issue. It seems outdated and likely no longer relevant. Ember no longer attempts to support IE 11 and the world has moved on from that browser.

By closing some old issues we reduce the list of open issues to a more manageable set. Let me know if you think this is a mistake and that the issue should stay open.