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

[Bug] iOS SVG renderer, label disappear when click. #19093

Closed
100pah opened this issue Sep 7, 2023 · 3 comments
Closed

[Bug] iOS SVG renderer, label disappear when click. #19093

100pah opened this issue Sep 7, 2023 · 3 comments
Milestone

Comments

@100pah
Copy link
Member

100pah commented Sep 7, 2023

Version

5.3.0+

Link to Minimal Reproduction

Steps to Reproduce

            option = {
                "xAxis": {
                    "type": "category",
                    "data": ["2018FY", "2019FY", "2020FY", "2021FY", "2022FY"],
                },
                "yAxis": {
                    "type": "value",
                },
                "series": [
                    {
                        "type": "bar",
                        "data": [111, 222, 3333, 444, 555],
                        "label": {
                            "show": true,
                            "position": "top"
                        }
                    }
                ]
            };

Use SVG renderer.
click on the bar, then click on blank, the labels disappear.

v5.2.2 is OK
v5.3+ started to be wrong.

aaaaaaaa

Current Behavior

Expected Behavior

Environment

- OS: iOS
- Browser:
- Framework:

Any additional comments?

No response

@100pah 100pah added the bug label Sep 7, 2023
@echarts-bot echarts-bot bot added the en This issue is in English label Sep 7, 2023
@100pah 100pah added this to the 5.5.0 milestone Sep 7, 2023
@100pah
Copy link
Member Author

100pah commented Dec 1, 2023

Info:

Can also reproduce it on macOS safari:
macOS13.3, safari Version 16.4 (18615.1.26.11.22)

record.mov

@100pah
Copy link
Member Author

100pah commented Dec 4, 2023

By ecomfe/zrender#1030 , the bug disappears. Thanks @alxnddr !

The root cause of this bug is unknown yet.
Just record some phenomena:
In safari (macOS13.3, safari Version 16.4 (18615.1.26.11.22)):

  1. When we hover the bar to make the text color become white unexpectedly, text attribute will not changed, the only changes are:
    • bar element elm.setAttribute('fill', 'rgb(92,123,217)'); /* or "#5470c6" */
    • the order of the corresponding elements.
  2. When this changes happen, if a SVG text node has no elm.style.cssText = 'font:12px'; /* or 'font-family:xxx' */, the text color probably become white unexpectedly.
    • Note that elm.setAttribute('style', 'font:12px'); /* or 'font-family:xxx' */ works for the style but the bug still happens.

@100pah
Copy link
Member Author

100pah commented Dec 4, 2023

Fixed by ecomfe/zrender#1030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants