From 468ed1b9a1b13d22601a316236fa23c726c82865 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 8 Mar 2017 17:41:11 +0100 Subject: [PATCH] Ensure that the `outlineWithDeepNesting` CSS class is removed when resetting `PDFOutlineViewer`, to prevent incorrect alignment if a new document is opened --- web/pdf_outline_viewer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/pdf_outline_viewer.js b/web/pdf_outline_viewer.js index 5b656ba69..0d080bdc0 100644 --- a/web/pdf_outline_viewer.js +++ b/web/pdf_outline_viewer.js @@ -65,6 +65,9 @@ var PDFOutlineViewer = (function PDFOutlineViewerClosure() { // Remove the outline from the DOM. this.container.textContent = ''; + // Ensure that the left (right in RTL locales) margin is always reset, + // to prevent incorrect outline alignment if a new document is opened. + this.container.classList.remove('outlineWithDeepNesting'); }, /**