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

fix(Tooltip): not dynamically update align when position is mouse #6764

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

KumJungMin
Copy link
Contributor

Defect Fixes

fix #6635

  • the align function is update tooltip position.
  • I think, the purpose of the align function is to update the fixed position(top, left, bottom etc) when the position of the target element changes.
  • So, I modified the tooltip's position to remain when the position is "mouse"

fixed result

result.mov

Copy link

vercel bot commented Jun 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
primereact ⬜️ Ignored (Inspect) Visit Preview Jun 18, 2024 1:45am
primereact-v9 ⬜️ Ignored (Inspect) Visit Preview Jun 18, 2024 1:45am

@melloware melloware added the Type: Bug Issue contains a defect related to a specific component. label Jun 17, 2024
@melloware
Copy link
Member

I like it but would this be better?

        useUpdateEffect(() => {
            const position = getPosition(currentTargetRef.current);

            if (visibleState && position !== 'mouse') {
                applyDelay('updateDelay', () => {
                    updateText(currentTargetRef.current, () => {
                        align(currentTargetRef.current);
                    });
                });
            }
        }, [props.content]);

@KumJungMin
Copy link
Contributor Author

KumJungMin commented Jun 18, 2024

I like it but would this be better?

        useUpdateEffect(() => {
            const position = getPosition(currentTargetRef.current);

            if (visibleState && position !== 'mouse') {
                applyDelay('updateDelay', () => {
                    updateText(currentTargetRef.current, () => {
                        align(currentTargetRef.current);
                    });
                });
            }
        }, [props.content]);

oh! thank you for suggestion :)
I changed it to the code that you suggested 🕺 (dbcdc66) @melloware

@melloware melloware merged commit a698936 into primefaces:master Jun 18, 2024
5 checks passed
@KumJungMin KumJungMin deleted the fix/issue-6635 branch June 18, 2024 02:03
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

Successfully merging this pull request may close these issues.

Tooltip crashes when position='mouse' and it changes
2 participants