Skip to content

Commit 32faeb5

Browse files
author
zhangxinxu
committed
avoid horizontal scroll bar
avoid horizontal scroll bar
1 parent 42c4f6b commit 32faeb5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/mobilebone.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@
185185
}
186186

187187
// do transition
188+
pageInto.style.display = "block";
189+
pageInto.clientWidth;
188190
pageInto.classList.remove("out");
189191
pageInto.classList.add("in");
190192
pageOut && pageInto.classList.add(params_in.form);
@@ -209,6 +211,12 @@
209211
});
210212
if (!store[pageid]) {
211213
var animateEventName = isWebkit? webkitkey: animationkey;
214+
index && pageInto.addEventListener(animateEventName, function() {
215+
if (this.classList.contains("in") == false) {
216+
this.style.display = "none";
217+
}
218+
});
219+
212220
if (typeof animition == "string" && params_in.root[animition]) {
213221
pageInto.addEventListener(animateEventName, function() {
214222
params_in.root[animition](this, this.classList.contains("in")? "into": "out");

0 commit comments

Comments
 (0)