Skip to content

Commit

Permalink
Merge pull request #112 from remotestorage/bugfix/109_backdrop_on_mob…
Browse files Browse the repository at this point in the history
…ile_devices

Fix modal backdrop display
  • Loading branch information
raucao authored Jun 11, 2020
2 parents d923abf + cc6938e commit 76e4c5e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ polygon.rs-logo-shape,

.remotestorage-widget-modal-backdrop {
display: none;
z-index: 20000000;
position: absolute;
position: fixed;
top: 0;
bottom: 0;
left: 0;
Expand Down
2 changes: 2 additions & 0 deletions src/assets/widget.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<div class="remotestorage-widget-modal-backdrop"></div>

<!--
rs-state-initial
rs-state-choose
Expand Down
13 changes: 0 additions & 13 deletions src/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,6 @@ Widget.prototype = {
return element;
},

/**
* Create the widget's modal backdrop element, add
* styling, and append to DOM
*
* @private
*/
createBackdropHtml () {
const backdropEl = document.createElement('div');
backdropEl.classList.add('remotestorage-widget-modal-backdrop');
document.body.appendChild(backdropEl);
},

/**
* Sets the `rs-modal` class on the widget element.
* Done by default for small screens (max-width 420px).
Expand Down Expand Up @@ -277,7 +265,6 @@ Widget.prototype = {
* @param {String} [elementId] - Widget's parent
*/
attach (elementId) {
this.createBackdropHtml()
const domElement = this.createHtmlTemplate();

let parentContainerEl;
Expand Down

0 comments on commit 76e4c5e

Please sign in to comment.