Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

页面切换时,原页面的链接仍可点击,导致页面空白 #211

Open
huyanbin opened this issue May 17, 2016 · 1 comment
Open

Comments

@huyanbin
Copy link

有个问题提一下,就是那个.mask,我看了下源码,在Mobilebone.ajax方法里面执行完后就把.mask隐藏了,这个时候才开始页面切换的动画,而页面切换有个过程,在这个过程中,原来页面里的链接还是可以点击的,这个时候就会出现连续打开页面,如果这几个页面的url一样,只是参数不同的话,按返回键会发现先打开的那个页面会是空白的。

这样说吧,在a页面,有b、c两个链接,这两个链接只是参数不同,按mobilebone的逻辑,这两个链接的内容是放在同一个.page里的。

如果我点击了b,在b请求完毕后,.mask就隐藏了,如果在页面切换过程还没完成的时候,点击c,这个时候会又去加载c。

加载c以后,如果我点击返回,会回到b,但是页面是空白的了,再按一次返回,回到a是正常的

不知道我这样有没有描述明白?

我觉得可以把隐藏.mask的操作放在Mobilebone.transition方法执行完以后,不过另外.mask好像只会在页面第一次载入的时候才显示,这里应该还需要调整下

@zhangxinxu
Copy link
Owner

好的,不错的反馈~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants