From 82b588389f20f3f88740054bd688438206370730 Mon Sep 17 00:00:00 2001
From: Jonas <Snuffleupagus@server.fake>
Date: Sun, 10 Mar 2013 13:56:24 +0100
Subject: [PATCH] Scroll the Thumbnail of the current page into view when
 exiting fullscreen mode

---
 web/viewer.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/web/viewer.js b/web/viewer.js
index df7e619ba..d5bb8d4d8 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -1730,6 +1730,10 @@ var PDFView = {
     this.page = this.page;
     this.clearMouseScrollState();
     this.hidePresentationControls();
+
+    // Ensure that the thumbnail of the current page is visible
+    // when exiting fullscreen mode.
+    scrollIntoView(document.getElementById('thumbnailContainer' + this.page));
   },
 
   showPresentationControls: function pdfViewShowPresentationControls() {