Skip to content

MdTooltip null reference property 'isVisible' on ESC key press  #7009

Closed
@TishchenkoAlex

Description

@TishchenkoAlex

Bug, feature request, or proposal:

Bug

What is the expected behavior?

no error in console

What is the current behavior?

error in console

Cannot read property 'isVisible' of null
at MdTooltip._handleKeydown

line 276 from tooltip.ts
/** Handles the keydown events on the host element. */ _handleKeydown(e: KeyboardEvent) { if (this._tooltipInstance!.isVisible() && e.keyCode === ESCAPE) { e.stopPropagation(); this.hide(0); } }

What are the steps to reproduce?

http://plnkr.co/edit/8fIEmoi4IkPWSycODZ5R?p=preview

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.3.6
Material beta 10
TS 2.5

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions