Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the "transitionend" event listener from the default viewer (issue 17347) #17360

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/unit/annotation_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2209,10 +2209,10 @@ describe("annotation", function () {
});

it("should compress and save text", async function () {
if (isNodeJS && getNodeVersion().major === 21) {
if (isNodeJS && getNodeVersion().major >= 20) {
pending(
"CompressionStream behaves differently in Node.js 21, " +
"compared to Firefox, Chrome, and Node.js 18/20."
"CompressionStream behaves differently in Node.js >= 20, " +
"compared to Firefox, Chrome, and Node.js 18."
);
}
const textWidgetRef = Ref.get(123, 0);
Expand Down
10 changes: 0 additions & 10 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,16 +689,6 @@ const PDFViewerApplication = {
appConfig.toolbar?.viewFind?.classList.add("hidden");
}

appConfig.mainContainer.addEventListener(
"transitionend",
function (evt) {
if (evt.target === /* mainContainer */ this) {
eventBus.dispatch("resize", { source: this });
}
},
true
);

if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
if (file) {
this.open({ url: file });
Expand Down
2 changes: 2 additions & 0 deletions web/pdf_sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ class PDFSidebar {
this.sidebarContainer.addEventListener("transitionend", evt => {
if (evt.target === this.sidebarContainer) {
this.outerContainer.classList.remove("sidebarMoving");
// Ensure that rendering is triggered after opening/closing the sidebar.
this.eventBus.dispatch("resize", { source: this });
}
});

Expand Down