Cards: Make the editing background fixed, to make it visible even with a scrolled viewport.
This commit is contained in:
@@ -557,13 +557,14 @@ Card.prototype = {
|
||||
this.divEditBackground = document.createElement("div");
|
||||
this.divEditBackground.className = "divEditBackground";
|
||||
this.divEditBackground.addEventListener("click", Card.prototype.btnEdit_Click.bind(this), false);
|
||||
this.divCard.offsetParent.insertBefore(this.divEditBackground, this.divCard);
|
||||
this.divCard.parentElement.insertBefore(this.divEditBackground, this.divCard);
|
||||
|
||||
},
|
||||
ExitEditionMode: function () {
|
||||
this.divOverlay.style.display = "";
|
||||
this.Editing = false;
|
||||
this.divEditBackground.offsetParent.removeChild(this.divEditBackground);
|
||||
this.divEditBackground.className = ""; // Needed to remove "position: fixed" that causes to be not found on parentElement.
|
||||
this.divEditBackground.parentElement.removeChild(this.divEditBackground);
|
||||
},
|
||||
btnEdit_Click: function (evt) {
|
||||
evt.preventDefault();
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
|
||||
.divEditBackground {
|
||||
display: block;
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
|
||||
Reference in New Issue
Block a user