Skip to content

disableClose in sidenav needs improvement #6427

Closed

Description

@naveedahmed1

Bug, feature request, or proposal:

Docs gives the below details about disableClose option in sidenav:

"Whether the sidenav can be closed with the escape key or not."

Usually clicking backdrop closes the sidenav, but when this option (disableClose) is set to true, it also disables the closing of SideNav using backdrop.

There could be cases where we would like to disable closing of Sidenav using Esc key but would like it to be closed when user clicks backdrop. Therefore, we should have two separate options disableCloseEsc and disableCloseBackdrop.

Activity

  1. julianobrasil commented on Aug 12, 2017

    @julianobrasil
    Contributor

    The dialogs have a similar behavior (but in this case it makes sense to have just one closing option). Maybe they're reusing the same libs to deal with this closing feature.

  2. willshowell commented on Aug 12, 2017

    @willshowell
    Contributor

    The general consensus with dialogs has been that disableClose will disable all methods of closing, and that the user should subscribe to the closing mechanisms individually to manually close the dialog.

    For the sidenav, backdrop clicks are already exposed as events, so it seems like the following should happen:

    1. The jsdoc comment should be updated to something like "Whether the user can close the sidenav with the escape key or clicking on the backdrop"
    2. The escape keydown event exposed as an event or observable
       
  3. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  4. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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