You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "Hanks Zhang (JIRA)" <ji...@apache.org> on 2018/07/05 09:38:00 UTC

[jira] [Resolved] (WEEX-327) 在ios的safari上bfcache失效(MessageChannel引起

     [ https://issues.apache.org/jira/browse/WEEX-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hanks Zhang resolved WEEX-327.
------------------------------
    Resolution: Delivered

> 在ios的safari上bfcache失效(MessageChannel引起
> --------------------------------------
>
>                 Key: WEEX-327
>                 URL: https://issues.apache.org/jira/browse/WEEX-327
>             Project: Weex
>          Issue Type: Bug
>          Components: Web Renderer
>    Affects Versions: 0.18
>         Environment: ios 11.3
> 浏览器:ios上所有浏览器
>            Reporter: wj
>            Assignee: Danz He
>            Priority: Major
>              Labels: weex, weex-vue-render
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> 问题复现:
> 1.打开下面dotWe链接:
> [http://dotwe.org/vue/b9a2bf2c5b5d39d61026f09b28905239]
> 2.点击手机模型下方的“Open it in a new page”得到独立页面的地址
> 3.用ios的safari的打开得到的地址
> 4.在列表页滚动一段距离,然后点击随便一个item跳转到下一页。
> 5.在下一页返回
> 期望表现:
> 应该从bfcache中恢复页面,返回后列表停在原来位置。
> 实际表现:
> 列表回到了顶部,页面js重新执行了。如果监听页面的pageshow事件,会发现event.persisted始终是false。
> 这个bug最早是在vue2.5.16上发现的[点这里|https://github.com/vuejs/vue/issues/8109]
> 因为vue2.4.4以后用到了MessageChannel导致了这个bug,所以在一个标准的vue工程里把vue版本降回2.4.3就没有问题了。
> 但是!在weex的工程里,就算我把vue版本降回2.4.3,还是不行,最终发现是下面这一行的问题
> [weex-vue-render/src/weex/index.js|https://github.com/weexteam/weex-vue-render/blob/5a8218089deebed99b6e1808e5a7a058a18b2373/src/weex/index.js#L28]
> Line 28 in [5a82180|https://github.com/weexteam/weex-vue-render/commit/5a8218089deebed99b6e1808e5a7a058a18b2373]
> | |import 'core-js/modules/es6.promise'|
> core-js这个库也用到了MessageChannel
> (飞猪的线上产品也是有这个问题的:[https://m.fliggy.com/?_projVer=0.1.128)|https://m.fliggy.com/?_projVer=0.1.128%EF%BC%89]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)