Skip to content

Commit

Permalink
Release 1.35.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Szefner committed Nov 25, 2019
1 parent 2df3a35 commit d480cc5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap3-dialog",
"description": "Make use of Bootstrap Modal more monkey-friendly. http://nakupanda.github.io/bootstrap3-dialog/",
"version": "1.35.4.1",
"version": "1.35.4.2",
"keywords": [
"css",
"js",
Expand Down
15 changes: 11 additions & 4 deletions dist/js/bootstrap-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
* https://github.com/nakupanda/bootstrap3-dialog
*
* Licensed under The MIT License.
* ================================================ */
* ================================================
*
* Modified by Robert Szefner
* Version: 1.35.4.2
*
*/

(function (root, factory) {

"use strict";
Expand Down Expand Up @@ -56,7 +62,7 @@

return version;
};
BootstrapDialogModal.ORIGINAL_BODY_PADDING = parseInt(($('body').css('padding-right') || 0), 10);
BootstrapDialogModal.ORIGINAL_BODY_STYLE = null;
BootstrapDialogModal.METHODS_TO_OVERRIDE = {};
BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.1'] = {};
BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.2'] = {
Expand Down Expand Up @@ -104,7 +110,8 @@
* @returns {undefined}
*/
setScrollbar: function () {
var bodyPad = BootstrapDialogModal.ORIGINAL_BODY_PADDING;
BootstrapDialogModal.ORIGINAL_BODY_STYLE = this.$body.attr('style') || null;
var bodyPad = parseInt(this.$body.css('padding-right') || 0, 10);
if (this.bodyIsOverflowing) {
this.$body.css('padding-right', bodyPad + this.scrollbarWidth);
}
Expand All @@ -117,7 +124,7 @@
resetScrollbar: function () {
var openedDialogs = this.getGlobalOpenedDialogs();
if (openedDialogs.length === 0) {
this.$body.css('padding-right', BootstrapDialogModal.ORIGINAL_BODY_PADDING);
this.$body.attr('style', BootstrapDialogModal.ORIGINAL_BODY_STYLE);
}
},
/**
Expand Down
Loading

0 comments on commit d480cc5

Please sign in to comment.