From 807ef136ba425b25821742bf0263f0fbc357934d Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 7 Jun 2015 08:58:04 -0700 Subject: [PATCH] Force `list` to be set as an attribute. --- packages/dom-helper/lib/prop.js | 7 +++++++ packages/dom-helper/tests/prop-test.js | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/dom-helper/lib/prop.js b/packages/dom-helper/lib/prop.js index a78bb6a6..606c2c09 100644 --- a/packages/dom-helper/lib/prop.js +++ b/packages/dom-helper/lib/prop.js @@ -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) { diff --git a/packages/dom-helper/tests/prop-test.js b/packages/dom-helper/tests/prop-test.js index ed78ebac..ceb02de7 100644 --- a/packages/dom-helper/tests/prop-test.js +++ b/packages/dom-helper/tests/prop-test.js @@ -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) { @@ -24,4 +25,4 @@ test('returns `undefined` for special element properties that are non-compliant var actual = normalizeProperty(element, pair.key); equal(actual, undefined); }); -}); \ No newline at end of file +});