Skip to content

[sidenav] Prevent closing by ESC key #6393

@Nodarii

Description

@Nodarii

Bug, feature request, or proposal:

Feature

What is the expected behavior?

I expect to have an API that doesn't allow user to close sidebar by clicking ESC

What is the current behavior?

When user gives focus to sidenav and then clicks ESC - it triggers sidenav close

What are the steps to reproduce?

https://material.angular.io/components/sidenav/examples
sidebar-esc-close

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

There are cases when sidenav is open by default and user dont have any control to "toggle" it visibility

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

@angular/cli: 1.2.7
node: 8.2.1
os: win32 x64
@angular/animations: 5.0.0-beta.2
@angular/cdk: 2.0.0-beta.8
@angular/common: 5.0.0-beta.2
@angular/compiler: 5.0.0-beta.2
@angular/core: 5.0.0-beta.2
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 5.0.0-beta.2
@angular/http: 5.0.0-beta.2
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 5.0.0-beta.2
@angular/platform-browser-dynamic: 5.0.0-beta.2
@angular/platform-server: 5.0.0-beta.2
@angular/router: 5.0.0-beta.2
@angular/cli: 1.2.7
@angular/compiler-cli: 5.0.0-beta.2

Metadata

Metadata

Assignees

No one assigned

    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