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

Commit

Permalink
Force <input> list to be set as an attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Jun 7, 2015
1 parent 0221aa8 commit 807ef13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions packages/dom-helper/lib/prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ var badPairs = [{
// if you set input.type = 'something-unknown'
tagName: 'INPUT',
propName: 'type'
}, {
// Some versions of IE (IE8) throw an exception when setting
// `input.list = 'somestring'`:
// https://github.com/emberjs/ember.js/issues/10908
// https://github.com/emberjs/ember.js/issues/11364
tagName: 'INPUT',
propName: 'list'
}];

function isSettable(element, attrName) {
Expand Down
7 changes: 4 additions & 3 deletions packages/dom-helper/tests/prop-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ QUnit.module('dom-helper prop');

test('returns `undefined` for special element properties that are non-compliant in certain browsers', function() {
expect(2);

var badPairs = [
{ tagName: 'BUTTON', key: 'type' },
{ tagName: 'INPUT', key: 'type' }
{ tagName: 'INPUT', key: 'type' },
{ tagName: 'INPUT', key: 'list' }
];

badPairs.forEach(function(pair) {
Expand All @@ -24,4 +25,4 @@ test('returns `undefined` for special element properties that are non-compliant
var actual = normalizeProperty(element, pair.key);
equal(actual, undefined);
});
});
});

0 comments on commit 807ef13

Please sign in to comment.