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: iOS9以下svg引起的Modal展示问题 #3229

Merged
merged 2 commits into from Jun 12, 2019
Merged

fix: iOS9以下svg引起的Modal展示问题 #3229

merged 2 commits into from Jun 12, 2019

Conversation

ziluo
Copy link
Contributor

@ziluo ziluo commented May 24, 2019

业务线反馈在iOS 9.2的真机上Modal无法正常展示,初步排查后发现是由于同时使用了Icon组件,经过详细定位后发现是引入Svg的时机问题,如果Svg延后引入就没问题,和

// Much simplified, do make sure run this after document ready
描述的问题有点类似,经测试发现把Svg的样式position: absolute删除即可解决问题,实测在iOS8、iOS9以及最新的iOS版本均可正常展示


This change is Reviewable

@@ -6,7 +6,7 @@ const svgSprite = (contents: string) => `
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
id="__ANTD_MOBILE_SVG_SPRITE_NODE__"
style="position:absolute;width:0;height:0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

出处应该是 https://github.com/JetBrains/svg-mixer/blob/master/packages/svg-mixer/runtime/src/sprite.config.js#L9

兼容性问题没啥好 review 的,这里本意只是想渲染但是不展示,表现不一致就得靠测了

@codecov
Copy link

codecov bot commented Jun 3, 2019

Codecov Report

Merging #3229 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3229   +/-   ##
=======================================
  Coverage   60.07%   60.07%           
=======================================
  Files          92       92           
  Lines        2282     2282           
  Branches      656      656           
=======================================
  Hits         1371     1371           
  Misses        902      902           
  Partials        9        9
Flag Coverage Δ
#web 60.07% <ø> (ø) ⬆️
Impacted Files Coverage Δ
components/icon/loadSprite.tsx 26.66% <ø> (ø) ⬆️
components/locale-provider/locale-provider.tsx 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 203eaa8...bf82332. Read the comment docs.

@doxiaodong doxiaodong merged commit 6a789cd into master Jun 12, 2019
@delete-merged-branch delete-merged-branch bot deleted the svg branch June 12, 2019 17:19
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.

None yet

3 participants