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

Tooltip positioned incorrectly when target is an SVG #2406

Closed
raymondcao-everlaw opened this issue Nov 8, 2021 · 0 comments
Closed

Tooltip positioned incorrectly when target is an SVG #2406

raymondcao-everlaw opened this issue Nov 8, 2021 · 0 comments
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@raymondcao-everlaw
Copy link
Contributor

raymondcao-everlaw commented Nov 8, 2021

I'm submitting a ... (check one with "x")

[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)

The first SVG circle in the sandbox below shows the bug. The second shows expected behavior (this is achieved by wrapping the SVG in a div as a workaround).

https://codesandbox.io/s/primereact-test-forked-97oko?file=/src/index.js

Current behavior
If the target of a global tooltip is an SVG, the tooltip will not be positioned next to the target when triggered (it will often appear offscreen).

Expected behavior
If the target of a global tooltip is an SVG, the tooltip will should be positioned next to the target.

Minimal reproduction of the problem with instructions

See sandbox link.

<>
    <Tooltip target=".svgtarget" autoHide={false} focusable={false}>
        Test Tooltip
    </Tooltip>
    <svg width="100" height="100" className="svgtarget">
        <circle cx="50" cy="50" r="40" stroke="green" strokeWidth="4" fill="yellow" />
    </svg>
</>

Please tell us about your environment:

  • React version: 17.0.1
  • PrimeReact version: 7.0.0
  • Browser: Chrome 95.0.4638.69
  • Language: Typescript, Javascript
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Nov 11, 2021
@mertsincan mertsincan added this to the 8.0.0 milestone Nov 11, 2021
mertsincan added a commit that referenced this issue Nov 11, 2021
@mertsincan mertsincan modified the milestones: 8.0.0, 7.0.1 Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants