Commit 4ce3aaae authored by Andrew Swan's avatar Andrew Swan
Browse files

Bug 1547322 Don't double-insert inner content when <button> is cloned r=bgrins

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

--HG--
extra : moz-landing-system : lando
parent 41114d24
......@@ -215,11 +215,6 @@
MozXULElement.implementCustomInterface(MozButtonBase, [Ci.nsIDOMXULButtonElement]);
class MozButton extends MozButtonBase {
constructor() {
super();
this.hasConnected = false;
}
static get inheritedAttributes() {
return {
".box-inherit": "align,dir,pack,orient",
......@@ -256,13 +251,15 @@
return frag;
}
get _hasConnected() {
return (this.querySelector(":scope > .button-box") != null);
}
connectedCallback() {
if (this.delayConnectedCallback() || this.hasConnected) {
if (this.delayConnectedCallback() || this._hasConnected) {
return;
}
this.hasConnected = true;
let fragment;
if (this.type === "menu") {
fragment = MozButton.menuFragment;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment