Skip to content

SVG not rendering correctly in Safari (missing viewBox) #140

Description

@skyhancloud

Safari has issues rendering svgs if the viewBox is missing. we saw this with react-heat-map, it just doesn't show up at all. the fix is to wrap svg in a container and add a ref to that container, then manually set the svg's viewBox in a useEffect. that makes it work on Safari. btw this seems to be a Safari-only bug. would be great if the library could be updated with a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions