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

fix: 修复在firefox下echarts、g6等canvas无法显示的问题(#428) #430

Merged

Conversation

woshirubbish
Copy link
Contributor

@woshirubbish woshirubbish commented Mar 6, 2023

  • 提交符合commit规范
  • npm run test通过
详细描述

火狐浏览器的bug,如下
https://bugzilla.mozilla.org/show_bug.cgi?id=941146

在css容器设置为display:none下,对canvas.getContent().font赋值会报NS_ERROR_FAILURE 错误 ,导致canvas无法渲染成功

  • 特性
  • 关联issue
    issue #428

@woshirubbish woshirubbish changed the title fix: 修复在firefox下echarts、g6等canvas无法显示的问题(#428) fix: 修复在firefox下echarts、g6等canvas无法显示的问题([#428](https://github.com/Tencent/wujie/issues/428) Mar 6, 2023
@woshirubbish woshirubbish changed the title fix: 修复在firefox下echarts、g6等canvas无法显示的问题([#428](https://github.com/Tencent/wujie/issues/428) fix: 修复在firefox下echarts、g6等canvas无法显示的问题([#428](https://github.com/Tencent/wujie/issues/428)) Mar 6, 2023
@woshirubbish woshirubbish changed the title fix: 修复在firefox下echarts、g6等canvas无法显示的问题([#428](https://github.com/Tencent/wujie/issues/428)) fix: 修复在firefox下echarts、g6等canvas无法显示的问题(#428) Mar 6, 2023
@yiludege
Copy link
Collaborator

yiludege commented Mar 8, 2023

用这个跑了一下demo,发现本来高度100%的body,iframe宽高为0还是将body给撑溢出了,这个地方这样改吧:

 const attrsMerge = { src: mainHostPath, style: "display: none", ...attrs, name: sandbox.id, [WUJIE_DATA_FLAG]: "" };

这样用户就可以通过 attrs 来自由的设置 style 了,但是由此带来的副作用也由用户来解决

@woshirubbish
Copy link
Contributor Author

woshirubbish commented Mar 8, 2023 via email

@woshirubbish woshirubbish force-pushed the fix/echarts-no-render-in-firefox branch from 8519f18 to 588bc49 Compare March 8, 2023 12:41
@woshirubbish
Copy link
Contributor Author

用这个跑了一下demo,发现本来高度100%的body,iframe宽高为0还是将body给撑溢出了,这个地方这样改吧:

 const attrsMerge = { src: mainHostPath, style: "display: none", ...attrs, name: sandbox.id, [WUJIE_DATA_FLAG]: "" };

这样用户就可以通过 attrs 来自由的设置 style 了,但是由此带来的副作用也由用户来解决

已改

@yiludege yiludege merged commit a7c0bcd into Tencent:master Mar 9, 2023
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

Successfully merging this pull request may close these issues.

2 participants