Skip to content

Commit

Permalink
fix(tooltip): fix isOpen and undefined containerClass [fixes #2257]
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaSurmay committed Jul 24, 2017
1 parent 64793c2 commit b6bdef8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"cpy": "5.0.0",
"cpy-cli": "1.0.1",
"del-cli": "0.2.1",
"enhanced-resolve": "3.3.0",
"gh-pages": "0.12.0",
"gitignore-to-glob": "0.3.0",
"google-code-prettify": "1.0.5",
Expand Down
6 changes: 4 additions & 2 deletions src/tooltip/tooltip.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export class TooltipDirective implements OnInit, OnDestroy {
public get isOpen(): boolean { return this._tooltip.isShown; }

public set isOpen(value: boolean) {
if (value) {this.show();} else {this.hide();}
setTimeout(() => {
if (value) {this.show();} else {this.hide();}
}, 0);
}

/**
Expand All @@ -53,7 +55,7 @@ export class TooltipDirective implements OnInit, OnDestroy {
/**
* Css class for tooltip container
*/
@Input() public containerClass: string;
@Input() public containerClass: string = '';

/**
* Emits an event when the tooltip is shown
Expand Down

0 comments on commit b6bdef8

Please sign in to comment.