From 0fdea4b05c9793c815c70b4e9609d8e7203e8d98 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 1 Apr 2024 15:55:55 +0200 Subject: [PATCH] Remove the `addWindowResolutionChange` listener unconditionally (PR 17767 follow-up) Given that `PDFViewerApplication.unbindWindowEvents` can be invoked in mozilla-central tests, we should ensure that the listener is always removed. --- web/app.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/web/app.js b/web/app.js index ffc58bfa2..63b6c35de 100644 --- a/web/app.js +++ b/web/app.js @@ -1915,9 +1915,6 @@ const PDFViewerApplication = { once: true, }); - if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) { - return; - } _boundEvents.removeWindowResolutionChange ||= function () { mediaQueryList.removeEventListener("change", addWindowResolutionChange); _boundEvents.removeWindowResolutionChange = null;