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 Visual Issue still persists #15795

Open
ajobra76 opened this issue Jun 5, 2024 · 5 comments
Open

Tooltip Visual Issue still persists #15795

ajobra76 opened this issue Jun 5, 2024 · 5 comments
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Milestone

Comments

@ajobra76
Copy link

ajobra76 commented Jun 5, 2024

Describe the bug

#15545
if tooltip is inside a table within a Dialog the problem still occures. In 17.16.1 it occured also without a dialog. In 17.15.0 the Problem did not exist.

Environment

windows,chrome

Reproducer

No response

Angular version

17

PrimeNG version

17.18.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.13.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@ajobra76 ajobra76 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 5, 2024
@mehmetcetin01140
Copy link
Contributor

Hi,

Could you please share a stackblitz example so we can identify the issue clearly?

@mehmetcetin01140 mehmetcetin01140 added Resolution: Needs More Information More information about the issue is needed to find a correct solution and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 6, 2024
@ajobra76
Copy link
Author

ajobra76 commented Jun 25, 2024

Modified prime ng dialog example with tooltip

<div class="card flex justify-content-center">
    <p-button (click)="showDialog()" label="Show" />
    <p-dialog header="Edit Profile" [modal]="true" [(visible)]="visible" [style]="{ width: '25rem' }">
        <span class="p-text-secondary block mb-5">Update your information.</span>
        <div class="flex align-items-center gap-3 mb-3">
            <label for="username" class="font-semibold w-6rem">Username</label>
            <input pInputText pTooltip="Hello" id="username" class="flex-auto" autocomplete="off" />
        </div>
        <div class="flex align-items-center gap-3 mb-5">
            <label for="email" class="font-semibold w-6rem">Email</label>
            <input pInputText id="email" class="flex-auto" autocomplete="off" />
        </div>
        <div class="flex justify-content-end gap-2">
            <p-button label="Cancel" severity="secondary" (click)="visible = false" />
            <p-button label="Save" (click)="visible = false" />
        </div>
    </p-dialog>
</div>

The tooltip text will not only show within the tooltip, but initially also in the dialogs parent component .

@ajobra76
Copy link
Author

ajobra76 commented Aug 2, 2024

https://stackblitz.com/edit/rfsxwz?file=src%2Fapp%2Fdialog-basic-demo.html

move mouse over input email you will see tooltip hello but you also see the text hello flickering on main page a second time

@Marco-Mauri
Copy link

I found the source of the bug.

After the version 17.15.0 in the show method of the Tooltip class the following if was added.

if (pDialogWrapper) {
setTimeout(() => {
this.container && this.align();
}, 100);
} else {
this.align();
}

the setTimeout causes a redraw to happen before the tooltip is fully setup causing the problem.

Simply removing the setTimeout fixes the problem, but I don't know why it was added, so maybe removing it causes other problems

@mertsincan mertsincan added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Resolution: Needs More Information More information about the issue is needed to find a correct solution labels Dec 25, 2024
@mertsincan mertsincan added this to the Future milestone Dec 25, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 25, 2024
Copy link

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback
Projects
Status: Review
Development

No branches or pull requests

4 participants