correctly show "Everything" in applies-to column

* don't show it twice
* show it if the style targets were actually removed since the last paint
This commit is contained in:
tophf 2018-03-19 07:10:59 +03:00
parent 65905edec9
commit dd5cd5c686

View File

@ -283,8 +283,14 @@ function createStyleTargetsElement({entry, style, iconsOnly}) {
}
}
if (numTargets) {
if (!iconsOnly) entryTargets.parentElement.replaceChild(targets, entryTargets);
} else {
if (!iconsOnly) {
entryTargets.parentElement.replaceChild(targets, entryTargets);
}
} else if (!entry.classList.contains('global') ||
!entryTargets.firstElementChild) {
if (entryTargets.firstElementChild) {
entryTargets.textContent = '';
}
entryTargets.appendChild(template.appliesToEverything.cloneNode(true));
}
entry.classList.toggle('global', !numTargets);