Bug 1383076 - restore workaround for 'current' setter on panelviews in non-photon panelmultiview, r=mconley

MozReview-Commit-ID: 6YZ6Wyu0Spc

--HG--
extra : rebase_source : 69df1d25835a817e37e5e852b68792aa8f506887
This commit is contained in:
Gijs Kruitbosch 2017-07-24 14:56:01 +01:00
Родитель 112b9f3ca9
Коммит 4b32580d0f
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -181,6 +181,12 @@ this.browserAction = class extends ExtensionAPI {
// Google Chrome onClicked extension API.
if (popupURL) {
try {
if (event.target.closest("panelmultiview")) {
// FIXME: The line below needs to change eventually, but for now:
// ensure the view is _always_ visible _before_ `popup.attach()` is
// called. PanelMultiView.jsm dictates different behavior.
event.target.setAttribute("current", true);
}
let popup = this.getPopup(document.defaultView, popupURL);
let attachPromise = popup.attach(event.target);
event.detail.addBlocker(attachPromise);