Files
tubestation/toolkit/content/resetProfile.js
Gijs Kruitbosch 634f3f9ff2 Bug 1600919 - work around XUL layout bug by manually measuring wrapping description element in reset profile dialog, r=MattN,zbraniecki
This is basically the same technique as `descriptionHeightWorkaround` in the
PanelMultiView implementation (from bug 1009116).

Differential Revision: https://phabricator.services.mozilla.com/D58948
2020-01-13 23:42:29 +00:00

19 lines
600 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
document.addEventListener("dialogaccept", onResetProfileAccepted);
function onResetProfileAccepted() {
let retVals = window.arguments[0];
retVals.reset = true;
}
document.addEventListener("DOMContentLoaded", async () => {
await document.l10n.ready;
let desc = document.querySelector("description");
desc.style.height = desc.getBoundingClientRect().height + "px";
});