react-component / react-component/util
Function isDom not working inside iframe
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 670
- Forks
- 205
- Avg merge
- 11d 17h
- Merged PRs (30d)
- 4
Description
When I use isDom(node) inside an iframe, it always returns false.
As a simple example (output in the console log): https://codesandbox.io/s/goofy-night-y5w6w9?file=/src/App.js
Version: rc-util: 5.29.3
Lib @rc-component/trigger Use this function and get wrong output with Tooltip, Popover, etc. in an iframe: https://github.com/react-component/trigger/blob/master/src/index.tsx#L235
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the iframe case from the linked CodeSandbox, then inspect the isDom entry point and its use in @rc-component/trigger's src/index.tsx. Compare behavior for nodes from the main document and iframe; done means isDom correctly recognizes the iframe node and the reported Tooltip and Popover behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100