antvis / antvis/X6

CSS position property not working as intended for Vue/React based nodes in Safari

Open
#3,167 3 comments 0 reactions 0 assignees View on GitHub
type: discussion 讨论
Dominant language
TypeScript
Stars
6.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

While adding CSS position property to any element within the Vue/React node, it renders fine in Chrome. But in Safari, it's not working as intended. The element is placed at the beginning.

### Your Example Website or App

https://codesandbox.io/s/vue-shape-forked-s6x9nz?file=/src/components/Count.vue

### Steps to Reproduce the Bug or Issue

Please open the below sandbox in both chrome and safari to spot the differences

[Vue based nodes](https://codesandbox.io/s/vue-shape-forked-s6x9nz?file=/src/components/Count.vue)

[React based nodes](https://codesandbox.io/s/wonderful-mestorf-il7vdt?file=/src/component.tsx)

### Expected behavior

Ideally it should work as expected in chrome

### Screenshots or Videos

image
image

### Platform

- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the difference between Chrome and Safari using the linked Vue sandbox at src/components/Count.vue and React sandbox at src/component.tsx. Inspect how CSS position is applied to elements inside each node type and compare the resulting layout; done means positioned elements render consistently in Safari and Chrome, with regression coverage where the project provides it.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.