Fix customize config panel on FF (#425)

This commit is contained in:
Andrey 2017-09-12 06:12:40 +03:00 committed by Paulus Schoutsen
parent 4e4b59d3d4
commit 73289bca6d
2 changed files with 6 additions and 2 deletions

View File

@ -68,7 +68,9 @@ class HaCustomizeAttribute extends Polymer.Element {
if (wrapper.lastChild) {
wrapper.removeChild(wrapper.lastChild);
}
this.$.child = child = document.createElement(tag);
// Creating an element with upper case works fine in Chrome, but in FF it doesn't immediately
// become a defined Custom Element. Polymer does that in some later pass.
this.$.child = child = document.createElement(tag.toLowerCase());
child.className = 'form-control';
child.addEventListener('item-changed', () => {
this.item = Object.assign({}, child.item);

View File

@ -97,7 +97,9 @@ window.hassUtil.dynamicContentUpdater = function (root, newElementTag, attribute
if (rootEl.lastChild) {
rootEl.removeChild(rootEl.lastChild);
}
customEl = document.createElement(newElementTag);
// Creating an element with upper case works fine in Chrome, but in FF it doesn't immediately
// become a defined Custom Element. Polymer does that in some later pass.
customEl = document.createElement(newElementTag.toLowerCase());
}
if (customEl.setProperties) {