We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66f0f92 commit d18dadbCopy full SHA for d18dadb
src/Modal.js
@@ -207,6 +207,12 @@ const Modal = React.createClass({
207
208
this._containerIsOverflowing = container.scrollHeight > containerClientHeight(container, this);
209
210
+ this._originalPadding = container.style.paddingRight;
211
+
212
+ if (this._containerIsOverflowing) {
213
+ container.style.paddingRight = parseInt(this._originalPadding || 0, 10) + scrollbarSize + 'px';
214
+ }
215
216
if (this.props.backdrop) {
217
this.iosClickHack();
218
}
@@ -237,6 +243,8 @@ const Modal = React.createClass({
237
243
238
244
let container = getContainer(this);
239
245
246
+ container.style.paddingRight = this._originalPadding;
247
240
248
container.className = container.className.replace(/ ?modal-open/, '');
241
249
242
250
this.restoreLastFocus();
0 commit comments