Skip to content

Commit

Permalink
Merge pull request #780 from Monota/develop
Browse files Browse the repository at this point in the history
Fix when modal dialog open, navbar slides slightly.
  • Loading branch information
koda-masaru authored Jul 3, 2017
2 parents 4f195eb + 5291535 commit 6b3e81a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/webapp/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ $(document).ready(function() {
}
});

$(window).load(function(){
var oldSSB = $.fn.modal.Constructor.prototype.setScrollbar;
$.fn.modal.Constructor.prototype.setScrollbar = function ()
{
oldSSB.apply(this);
if(this.bodyIsOverflowing && this.scrollbarWidth)
{
$('.navbar-fixed-top, .navbar-fixed-bottom').css('padding-right', this.scrollbarWidth);
}
}

var oldRSB = $.fn.modal.Constructor.prototype.resetScrollbar;
$.fn.modal.Constructor.prototype.resetScrollbar = function ()
{
oldRSB.apply(this);
$('.navbar-fixed-top, .navbar-fixed-bottom').css('padding-right', '');
}
});

// セッションが切れないように、定期的にアクセスする(5分に1回)
var accessInterval = function() {
setInterval(function() {
Expand Down

0 comments on commit 6b3e81a

Please sign in to comment.