From 03720101d7d5fee1808661f211e2cb6c557742c4 Mon Sep 17 00:00:00 2001
From: Marius Gavrilescu <marius@ieval.ro>
Date: Sat, 18 Apr 2015 12:35:02 +0300
Subject: [PATCH] Hide modal backdrop by default

---
 js/10-modal.js   | 4 +++-
 tmpl/pb_entry.en | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/js/10-modal.js b/js/10-modal.js
index 1c290ef..62cbb27 100644
--- a/js/10-modal.js
+++ b/js/10-modal.js
@@ -1,7 +1,8 @@
-let modal, hiding;
+let modal, backdrop, hiding;
 
 function show_modal () {
 	modal.classList.remove('hidden');
+	backdrop.classList.remove('hidden');
 	setTimeout(function (){
 		document.body.classList.add('modal-open');
 	}, 20);
@@ -13,6 +14,7 @@ function hide_modal () {
 
 $(function() {
 	modal = $('.modal')[0];
+	backdrop = $('.backdrop')[0];
 	$(modal).on('transitionend', el => {
 		if(!document.body.classList.contains('modal-open'))
 			modal.classList.add('hidden');
diff --git a/tmpl/pb_entry.en b/tmpl/pb_entry.en
index 9f0cecb..7b37669 100644
--- a/tmpl/pb_entry.en
+++ b/tmpl/pb_entry.en
@@ -51,5 +51,5 @@ To submit solutions to this problem, please visit the problem <a href="/pb/id">o
 </div>
 </div>
 
-<div class="backdrop"></div>
+<div class="hidden backdrop"></div>
 <div id="solution_modal" class="hidden modal"></div>
-- 
2.39.5