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.
This commit is contained in:
parent
3d2eb36e27
commit
0fdea4b05c
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user