Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close dialog on Esc? #67

Closed
softwareguy74 opened this issue Nov 25, 2019 · 11 comments · Fixed by #185
Closed

Close dialog on Esc? #67

softwareguy74 opened this issue Nov 25, 2019 · 11 comments · Fixed by #185
Labels
Feature Request Request to add a new feature Needs: Design The issues needs design work before implementing

Comments

@softwareguy74
Copy link

Is it possible to somehow wire up the Esc key to close the dialog?

@chrissainty
Copy link
Member

Yes, I'll add this as an enhancement.

@newmancodes
Copy link

PR raised #99

@chrissainty chrissainty added Feature Request Request to add a new feature Needs: Design The issues needs design work before implementing and removed enhancement Good First Issue Good for newcomers labels Mar 8, 2020
@pcecamacho
Copy link

Hello
Any news related to this feature?
Thank you

@chrissainty
Copy link
Member

chrissainty commented Apr 25, 2020

@pcecamacho We haven't added the feature so far. It would require a bump in the major version number as it introduces a breaking change and I wouldn't want to do that for such a small feature. We'll look at it when we add some other functionality.

@jenmagjen
Copy link

@chrissainty Hi! :) I recently spoke to a guy in the norwegian Blind organization, which is working with user testing of different websites and online services. He said unclosable modals (no support for Esc) were like traps for them. They have to close the tab, hit the back button or refresh the whole page in order to close them. So in support for all our visually impaired friends out there who love to use the Internet, this would really be an important update - and for them, not at all a small feature :) Looking forward to that update. :)

@chrissainty
Copy link
Member

@jenmagjen Agreed, please understand when I said small I meant in terms of changes. Generally speaking, this control hasn't been built with blind/sight-impaired users in mind and therefore there are probably a lot of things we need to do to make this fully accessible to sight-impaired users. Adding this would help but I'm sure we have a very long way to go still.

I'm literally at breaking point right now in terms of commitments and I'm going to be booking some holiday from work so I can work on the backlog of Blazored issues (currently over 40). When I do I'll make sure this is included.

@jenmagjen
Copy link

@chrissainty Yes, another known issue is that modals let the "background" be open. So the screen readers does not "see" that the rest of the content is hidden by opacity/overlay, and may get confused when browsing down a page which for other users is "hidden". :) I fully understand that not all can be in place now. Development takes time. :) All improvements are great. Blazor pages with the different Blazored-stuff is really working well. :) So your job so far has been excellent. :) I'll follow the gits with eager :)

@chrissainty
Copy link
Member

Thanks for the information @jenmagjen and it's always great to hear the components are helping people 🙂

@NeskireDK
Copy link

NeskireDK commented Oct 6, 2021

@chrissainty Closing modal with ESC is not functioning.
Steps to reproduce:

  1. git clone --recurse-submodules https://github.com/Blazored/Modal.git
  2. build and run (npm install, msbuild, run browser succesfully)
  3. Test any of the modals on the demo, non of these can close with ESC, most can with click in dark areas.
  4. rebuild with setting makes no difference, in demo nor in my own project:
    <CascadingBlazoredModal ActivateFocusTrap="true">
    previously known as:
    <CascadingBlazoredModal FocusFirstElement="true">

Using chrome: Version 86.0.4240.75 (Official Build) (64-bit)
OS regional country: Denmark
Keyboard language: Danish

@larsk2009
Copy link
Collaborator

Hi @NeskireDK, this feature was removed from the modal, see #201 and it's fix #202. Basically, having escape to close will mess with everything inside the modal and was removed for that reason.

@NeskireDK
Copy link

@larsk2009 thanks for getting back to me. I couldn’t find that related issue. Thanks for clearing this up. Spent 6 hours trying to work around this issue as it was pretty important for my end users.

If anyone is aware of a work around, Kindly reply on this thread, otherwise I consider this issue solved and closed.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Request to add a new feature Needs: Design The issues needs design work before implementing
Projects
None yet
7 participants