From 9d815e9b17036da15fd9f57f2d7924ecd05fdd67 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 | 9 +++++---- 2 files changed, 12 insertions(+), 4 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..5318340b 100644 --- a/packages/dom-helper/tests/prop-test.js +++ b/packages/dom-helper/tests/prop-test.js @@ -3,11 +3,12 @@ import { normalizeProperty } from 'dom-helper/prop'; QUnit.module('dom-helper prop'); test('returns `undefined` for special element properties that are non-compliant in certain browsers', function() { - expect(2); - + expect(3); + 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 +});