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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cannot set form attribute of <output> #19272

Closed
srsgores opened this issue Nov 14, 2020 · 3 comments 路 Fixed by #19282
Closed

[Bug] Cannot set form attribute of <output> #19272

srsgores opened this issue Nov 14, 2020 · 3 comments 路 Fixed by #19282
Labels

Comments

@srsgores
Copy link

馃悶 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
@KrishnaRPatel
Copy link
Contributor

I put in a PR to glimmer-vm that should fix this here: glimmerjs/glimmer-vm#1209

@rwjblue
Copy link
Member

rwjblue commented Nov 20, 2020

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.

@KrishnaRPatel
Copy link
Contributor

@rwjblue Happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants