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

1.5.1版本路由问题 #89

Closed
Realgomu opened this issue Sep 12, 2015 · 7 comments
Closed

1.5.1版本路由问题 #89

Realgomu opened this issue Sep 12, 2015 · 7 comments

Comments

@Realgomu
Copy link

有3个路由状态aaa、bbb、bbb.ccc

当页面第一次加载时,进入aaa,直接转到bbb.ccc时无法正常显示页面
chrome中log显示navigating to [bbb.ccc] will be stopped, redirect to [bbb.ccc] now

但是依次点击aaa、bbb、bbb.ccc时,是正常的,仅仅页面第一次加载后会出现aaa到bbb.ccc异常

测试代码见:https://github.com/Realgomu/AvalonTest

@gogoyqj
Copy link
Contributor

gogoyqj commented Sep 22, 2015

@Realgomu 你是苹果?

这个是坑爹的ios 9 bug

@gogoyqj
Copy link
Contributor

gogoyqj commented Sep 22, 2015

mmHistory

            if (hash) {
                setTimeout(function() { // TODO: rm the timeout when ios9 fix its location-hash-delay bug
                    event.preventDefault()
                    avalon.router && avalon.router.navigate(hash)
                }, 60);
            }
            // if (hash) {
            //     event.preventDefault()
            //     avalon.router && avalon.router.navigate(hash)
            // }

@IndexXuan
Copy link

不是仅仅ios9出现的话就不是这个问题,另找吧。。。

@Realgomu
Copy link
Author

@gogoyqj 把history里的这段代码替换成你给的就正常了,谢谢!

@gogoyqj
Copy link
Contributor

gogoyqj commented Sep 22, 2015

@Realgomu 我反复验证之后发现,问题是处在mmHistory.js,而且是你的版本问题,请更新avalon.oniui mmrouter里面的mmHistory最新版本,这个问题就fix了,而不用像上面那么修改

@RubyLouvre
Copy link
Owner

gogoyqj 同步一下吧

@Realgomu
Copy link
Author

mmHistory文件版本问题,使用oniui中的文件已正常

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

4 participants