Skip to content

Commit 76e4c5e

Browse files
author
Sebastian Kippe
authored
Merge pull request #112 from remotestorage/bugfix/109_backdrop_on_mobile_devices
Fix modal backdrop display
2 parents d923abf + cc6938e commit 76e4c5e

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

src/assets/styles.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,7 @@ polygon.rs-logo-shape,
391391

392392
.remotestorage-widget-modal-backdrop {
393393
display: none;
394-
z-index: 20000000;
395-
position: absolute;
394+
position: fixed;
396395
top: 0;
397396
bottom: 0;
398397
left: 0;

src/assets/widget.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<div class="remotestorage-widget-modal-backdrop"></div>
2+
13
<!--
24
rs-state-initial
35
rs-state-choose

src/widget.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,6 @@ Widget.prototype = {
180180
return element;
181181
},
182182

183-
/**
184-
* Create the widget's modal backdrop element, add
185-
* styling, and append to DOM
186-
*
187-
* @private
188-
*/
189-
createBackdropHtml () {
190-
const backdropEl = document.createElement('div');
191-
backdropEl.classList.add('remotestorage-widget-modal-backdrop');
192-
document.body.appendChild(backdropEl);
193-
},
194-
195183
/**
196184
* Sets the `rs-modal` class on the widget element.
197185
* Done by default for small screens (max-width 420px).
@@ -277,7 +265,6 @@ Widget.prototype = {
277265
* @param {String} [elementId] - Widget's parent
278266
*/
279267
attach (elementId) {
280-
this.createBackdropHtml()
281268
const domElement = this.createHtmlTemplate();
282269

283270
let parentContainerEl;

0 commit comments

Comments
 (0)