Skip to content

Commit

Permalink
Merge pull request #15934 from primefaces/issue-15933
Browse files Browse the repository at this point in the history
Fixed #15933 - Button Tooltip shows up after Dialog opens
  • Loading branch information
cetincakiroglu authored Jul 4, 2024
2 parents ddd0018 + 86e6bfd commit c265d84
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/app/components/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ export class Tooltip implements AfterViewInit, OnDestroy {

resizeListener: any;

interactionInProgress = false;

constructor(
@Inject(PLATFORM_ID) private platformId: any,
public el: ElementRef,
Expand Down Expand Up @@ -339,24 +341,28 @@ export class Tooltip implements AfterViewInit, OnDestroy {
}

activate() {
this.active = true;
this.clearHideTimeout();
if (!this.interactionInProgress) {
this.active = true;
this.clearHideTimeout();

if (this.getOption('showDelay'))
this.showTimeout = setTimeout(() => {
this.show();
}, this.getOption('showDelay'));
else this.show();
if (this.getOption('showDelay'))
this.showTimeout = setTimeout(() => {
this.show();
}, this.getOption('showDelay'));
else this.show();

if (this.getOption('life')) {
let duration = this.getOption('showDelay') ? this.getOption('life') + this.getOption('showDelay') : this.getOption('life');
this.hideTimeout = setTimeout(() => {
this.hide();
}, duration);
if (this.getOption('life')) {
let duration = this.getOption('showDelay') ? this.getOption('life') + this.getOption('showDelay') : this.getOption('life');
this.hideTimeout = setTimeout(() => {
this.hide();
}, duration);
}
}
this.interactionInProgress = true;
}

deactivate() {
this.interactionInProgress = false;
this.active = false;
this.clearShowTimeout();

Expand Down

0 comments on commit c265d84

Please sign in to comment.