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

在Mobile Safari 13.0.5版本中不能使用 #610

Closed
limka0129 opened this issue Mar 13, 2023 · 4 comments
Closed

在Mobile Safari 13.0.5版本中不能使用 #610

limka0129 opened this issue Mar 13, 2023 · 4 comments
Labels

Comments

@limka0129
Copy link

limka0129 commented Mar 13, 2023

vConsole Version:
3.15.0

操作系统版本:iOS 13.3.1

image

弄了一个空白页面,基本可以排除其他影响~
很奇怪,只有这个版本不行,别的Safari版本都可以用

@yuguaa
Copy link

yuguaa commented Mar 22, 2023

ios 10, 俺也一样

@fxfSean
Copy link

fxfSean commented Apr 17, 2023

ios 10, 俺也一样

@limka0129 @yuguaa
我也在我的IOS 系统版本12.4.5测试机上遇到了这个问题,连接电脑后发现报这个错误:
ReferenceError: Can't find variable: ResizeObserver
image

然后这个API在IOS 13以下是不支持的
image
虽然我在项目的package.json中配置了browserslist
"ios_saf >= 10", "Safari >= 10",
但是打包文件中依旧出现了这个ResizeObserver,搞不明白。
最后解决办法是在package.json中添加这个依赖:
"resize-observer": "^1.0.4",
然后在使用Vconsole的位置之前安装:

注意是之前

if (!window.ResizeObserver) {
  install();
}
import Vconsole from 'vconsole' ```

Maizify added a commit that referenced this issue May 23, 2023
@Maizify
Copy link
Collaborator

Maizify commented May 23, 2023

iOS 13.3 不兼容 ResizeObserver 确实会导致这个问题。
我加了个 ResizeObserverPolyfill,理论上可以规避掉这个情况(会缺失实际能力,但不影响日志功能)。但我手头上没有可测试的设备,有条件的朋友可以试下。

@Maizify Maizify added the Done label May 23, 2023
@QinZhen001
Copy link
Contributor

遇上了 ResizeObserver 问题+1 android 系统 6.x

Maizify added a commit that referenced this issue Jun 1, 2023
…`ResizeObserver`, but there may be a potential performance issue when printing a large number of logs. (issue #610)
@Maizify Maizify closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants