Ember.js: [Bug] Cannot set form attribute of <output>

Created on 15 Nov 2020  ·  3Comments  ·  Source: emberjs/ember.js

🐞 Describe the Bug

Using the <output> element outside of a <form> via the form attribute will cause handlebars to throw the following error:

runtime.js:463 Uncaught (in promise) TypeError: Cannot assign to read only property 'form' of object '#'
at NewElementBuilder.__setProperty (runtime.js:463)
at DefaultDynamicProperty.set (runtime.js:1331)
at NewElementBuilder.setDynamicAttribute (runtime.js:473)
at Object.evaluate (runtime.js:3070)
at AppendOpcodes.evaluate (runtime.js:2008)
at LowLevelVM.evaluateSyscall (runtime.js:4927)
at LowLevelVM.evaluateInner (runtime.js:4883)
at LowLevelVM.evaluateOuter (runtime.js:4875)
at JitVM.next (runtime.js:5824)
at JitVM.execute (runtime.js:5799)

🔬 Minimal Reproduction

Assign the form attribute of an <output> tag to any value:

{{#if this.eventDuration}}
    <output for="{{this.elementId}}-start-time {{this.elementId}}-end-time" form="{{this.elementId}}-form" aria-atomic="true" aria-live="assertive"><span class="visuallyhidden">{{@node.name}} will last </span>{{moment-duration this.eventDuration}}</output>
{{/if}}

🌍 Environment

  • Ember: - 3.18.1
  • Node.js/npm: - 15.1.0
  • OS: - Windows 10
  • Browser: - Chromium 85.0.4350.0
Bug

Most helpful comment

Thanks @KrishnaRPatel! That is merged and released. I'm working to update glimmer-vm over in #19282 (to fix another bug) and that bump includes the fixes.

All 3 comments

I put in a PR to glimmer-vm that should fix this here: https://github.com/glimmerjs/glimmer-vm/pull/1209

Thanks @KrishnaRPatel! That is merged and released. I'm working to update glimmer-vm over in #19282 (to fix another bug) and that bump includes the fixes.

@rwjblue Happy to help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olivia picture olivia  ·  36Comments

Yelinz picture Yelinz  ·  47Comments

alexander-alvarez picture alexander-alvarez  ·  30Comments

ctataryn picture ctataryn  ·  33Comments

fivetanley picture fivetanley  ·  44Comments