From 76cdc94cd5213b63d4f142183ae829e267f85ac8 Mon Sep 17 00:00:00 2001
From: Claas Kazzer <kazzer@ub.uni-leipzig.de>
Date: Wed, 11 Jul 2018 12:51:44 +0200
Subject: [PATCH] refs #13625 * adds fix for padding-right-jump on modal-open

---
 package-lock.json              |  2 +-
 themes/finc/js/finc.js         |  5 ++---
 themes/finc/scss/compiled.scss | 10 +++++++++-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index dd6f66cc276..5cf49c26ec7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "vufind",
-  "version": "4.1.2",
+  "version": "4.1.3",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
diff --git a/themes/finc/js/finc.js b/themes/finc/js/finc.js
index c70b2c9a855..2108644505a 100644
--- a/themes/finc/js/finc.js
+++ b/themes/finc/js/finc.js
@@ -1,10 +1,9 @@
 // remove when fixed in BS
 
-// Remove/add aria-hidden + add modalTitle for screen-reader access
+// Remove/add aria-hidden + add modalTitle for screen-reader access, check of .focus() is necessary
 $(document).on('shown.bs.modal', function () {
-  $('#modal').attr('aria-hidden', 'false').show();
+  $('#modal').attr('aria-hidden', 'false').show().focus();
   $('#modal h2').attr('id', 'modalTitle');
-  $('#modal').focus(); // check if necessary!
 });
 
 $(document).on('hidden.bs.modal', function () {
diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss
index 2d06c7c5fef..cb253ef589b 100644
--- a/themes/finc/scss/compiled.scss
+++ b/themes/finc/scss/compiled.scss
@@ -68,6 +68,9 @@ section {
 // Add top-padding to body to accommodate fixed navbar; -- padding should equal navbar-height --
 // the home page, however, has a lower navbar because there is no breadcrumbs there
 body {
+  // fix modal adding padding-right #13625
+  padding-right: 0 !important;
+
   // for mobile
   padding-top: $navbar-height-xs;
 
@@ -751,7 +754,7 @@ table.collapse.in {
 
 ////// NO gutter right
 .no-gutter-r {
-  padding-right: 0;
+  padding-right: 0 !important;
 }
 
 ////// gutter left
@@ -1843,6 +1846,11 @@ footer ul {
   }
 }
 
+// fix modal adding padding-right #13625
+.modal-open {
+  overflow: initial;
+}
+
 // MODALS - END
 
 // Bookbag
-- 
GitLab