antvis / antvis/X6

react 节点下 foreignObject 可以不使用body标签名?

Open
#4,100 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.7k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

在一些JQ项目和库里,会导致JQuery("body")选择多个节点,dom操作的时候会都触发

### Your Example Website or App

https://stackoverflow.com/help/mcve.

### Steps to Reproduce the Bug or Issue

渲染antv/x6 react元素
JQuery("body").append("

")

### Expected behavior

JQuery("body").append("

")只在document.body下

### Screenshots or Videos
![image](https://github.com/antvis/X6/assets/11569655/71531ab4-8984-407e-b4bf-7d79c1910df2)

_No response_

### Platform

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

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue while rendering an antv/X6 React element containing foreignObject, then inspect the resulting DOM and how JQuery("body") resolves nodes. Done means JQuery("body").append(...) affects only document.body rather than multiple body nodes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.