Bug 1501622 - For consistency, clear innerHTML in SwatchTooltips;r=pbro

Depends on D9648

Note that this is not strictly necessary since the set* methods are only called when
the Swatch tooltips are built, so they always operate on "new" HTML Tooltips. But
since this is not very self explanatory I think it will be less surprising to be
on the safe side and clear innerHTML in the methods directly.

Differential Revision: https://phabricator.services.mozilla.com/D9649

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julian Descottes 2018-10-24 13:37:17 +00:00
Родитель 566f6da124
Коммит 92f43aeec4
3 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -51,6 +51,7 @@ class SwatchColorPickerTooltip extends SwatchBasedEditorTooltip {
setColorPickerContent(color) {
const { doc } = this.tooltip;
this.tooltip.panel.innerHTML = "";
const container = doc.createElementNS(XHTML_NS, "div");
container.id = "spectrum-tooltip";

Просмотреть файл

@ -41,6 +41,7 @@ class SwatchCubicBezierTooltip extends SwatchBasedEditorTooltip {
setCubicBezierContent(bezier) {
const { doc } = this.tooltip;
this.tooltip.panel.innerHTML = "";
const container = doc.createElementNS(XHTML_NS, "div");
container.className = "cubic-bezier-container";

Просмотреть файл

@ -43,6 +43,7 @@ class SwatchFilterTooltip extends SwatchBasedEditorTooltip {
setFilterContent(filter) {
const { doc } = this.tooltip;
this.tooltip.panel.innerHTML = "";
const container = doc.createElementNS(XHTML_NS, "div");
container.id = "filter-container";