Skip to content

Commit

Permalink
Fix modal overlay (#1946)
Browse files Browse the repository at this point in the history
* Fix modal overlay

fixes #1941

* fix speed
  • Loading branch information
Kukks committed Oct 6, 2020
1 parent ace904c commit cfa568a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions BTCPayServer/Views/Shared/LayoutPartials/SyncModal.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</div>
<script>
var syncModalContent = $('#syncModalContent');
var syncModal = $('#syncModal');
if (localStorage.getItem("sync-collapsed")){
syncModalContent.removeClass("show");
}
Expand All @@ -36,8 +37,18 @@
}).on('shown.bs.collapse', function () {
localStorage.removeItem("sync-collapsed");
});
function handleFooterBottom() {
if (document.getElementsByTagName("footer")[0].getBoundingClientRect().top < window.innerHeight){
syncModal.stop().animate({"bottom":"40px"}, 200);
} else {
syncModal.stop().animate({"bottom":"10px"}, 200);
}
}
$(document).on("scroll", handleFooterBottom);
handleFooterBottom();
</script>
<style type="text/css">
#syncModal {
position: fixed;
bottom: 40px;
Expand Down

0 comments on commit cfa568a

Please sign in to comment.