Skip to content

Commit

Permalink
[BUGFIX] Add output tag to attributes override
Browse files Browse the repository at this point in the history
(cherry picked from commit 38a991b)
  • Loading branch information
KrishnaRPatel authored and rwjblue committed Nov 20, 2020
1 parent 4f2505c commit 8295f7f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/@glimmer/integration-tests/test/attributes-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,19 @@ export class AttributesTests extends RenderTest {
this.assertStableRerender();
}

@test
'can set attributes on form properties'() {
this.render('<form id={{foo}}></form><output form={{foo}}></output>', { foo: 'bar' });

let outputElement = assertElement(this.element.lastChild);

this.assert.ok(hasAttribute(outputElement, 'form'));
this.assert.equal(this.readDOMAttr('form', outputElement), 'bar');

this.assertStableRerender();
this.assertStableNodes();
}

@test
'handles null input values'() {
this.render('<input value={{isNull}} />', { isNull: null });
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/runtime/lib/dom/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const ATTR_OVERRIDES: Dict<Dict> = {
FIELDSET: { form: true },
LEGEND: { form: true },
OBJECT: { form: true },
OUTPUT: { form: true },
BUTTON: { form: true },
};

Expand Down

0 comments on commit 8295f7f

Please sign in to comment.