Skip to content

Commit

Permalink
Fixed #15933 - Button Tooltip shows up after Dialog opens
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jul 2, 2024
1 parent ceedbb9 commit 86e6bfd
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 86e6bfd

Please sign in to comment.