Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Commit 3ca80d3

Browse files
committed
Make sure input.size is a property.
- Will get IndexSizeError when set input.size="auto". - Make 'size' an attribute, so that always use dom.setAttribute.
1 parent 90fa31f commit 3ca80d3

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/dom-helper/lib/prop.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ var ATTR_OVERRIDES = {
5757
// Chrome 46.0.2464.0: 'autocorrect' in document.createElement('input') === false
5858
// Safari 8.0.7: 'autocorrect' in document.createElement('input') === false
5959
// Mobile Safari (iOS 8.4 simulator): 'autocorrect' in document.createElement('input') === true
60-
autocorrect: true
60+
autocorrect: true,
61+
// Will throw an exception(https://github.com/emberjs/ember.js/issues/12413),
62+
// if you set input.size = 'auto'
63+
size: true
6164
},
6265

6366
// element.form is actually a legitimate readOnly property, that is to be

packages/dom-helper/tests/prop-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { normalizeProperty } from 'dom-helper/prop';
33
QUnit.module('dom-helper prop');
44

55
test('type.attr, for element props that for one reason or another need to be treated as attrs', function() {
6-
expect(13);
6+
expect(14);
77

88
[
99
{ tagName: 'TEXTAREA', key: 'form' },
@@ -12,6 +12,7 @@ test('type.attr, for element props that for one reason or another need to be tre
1212
{ tagName: 'INPUT', key: 'list' },
1313
{ tagName: 'INPUT', key: 'form' },
1414
{ tagName: 'INPUT', key: 'autocorrect' },
15+
{ tagName: 'INPUT', key: 'size' },
1516
{ tagName: 'OPTION', key: 'form' },
1617
{ tagName: 'INPUT', key: 'form' },
1718
{ tagName: 'BUTTON', key: 'form' },

0 commit comments

Comments
 (0)