diff --git a/html/document.js b/html/document.js
index c507429..9819187 100644
--- a/html/document.js
+++ b/html/document.js
@@ -259,6 +259,12 @@ app = new Vue({
this.diff = true;
document.activeElement = null;
+ },
+ calcOverflow(){
+ const { loading,output } = this;
+ const hidden = !!(loading || output);
+ const el = document.documentElement;
+ el.setAttribute('data-no-scroll',hidden);
}
},
computed: {
@@ -278,12 +284,14 @@ app = new Vue({
handler(){
this._louvre();
}
- }
+ },
+ loading:'calcOverflow',
+ output:'calcOverflow',
}
});
-
+app.calcOverflow();
setTimeout(_=>{
diff --git a/html/document.less b/html/document.less
index d9eeed0..0cd80ba 100644
--- a/html/document.less
+++ b/html/document.less
@@ -223,6 +223,9 @@ input[type="range"]{
} */
h1{
+}
+html[data-no-scroll="true"]{
+ overflow: hidden;
}
.ui-shadow{
position: fixed;
@@ -233,6 +236,8 @@ h1{
z-index:1;
background:rgba(0,0,0,.5);
overflow: auto;
+ overflow-y: scroll;
+ overscroll-behavior: contain;
}
.output-box{
background:#FFF;