scale icon indicating copy to clipboard operation
scale copied to clipboard

escape keydown event focus issue

Open nikolab-pn opened this issue 3 years ago • 2 comments

When pressing escape anywhere on the page focus is moved to header user-menu. This is unexpected when closing modals and similar situations.

https://codesandbox.io/s/agitated-tdd-i3d6hd?file=/src/App.js https://i3d6hd.csb.app/

Steps:

  1. Open page: https://i3d6hd.csb.app/
  2. Open modal
  3. Click escape to close modal
  4. Press enter and user-menu will open

*doesnt work from sandbox editor page needs to be opened in new window

nikolab-pn avatar Feb 17 '22 11:02 nikolab-pn

Hi @nikolab-pn, thanks for making us aware - this is indeed not the expected behavior. We will take a look but meanwhile, you could implement your own custom behavior, programmatically focusing the button which initiated the modal to open - similar to how it was described in this issue: https://github.com/telekom/scale/issues/842 I'll come back to you when there is a proper fix, however focusing on the trigger button after closing the modal will need to be manually implemented for each use case nevertheless.

nowseemee avatar Feb 21 '22 10:02 nowseemee

Hi @nowseemee, any info when this event will be fixed?

nikolab-pn avatar Aug 17 '22 11:08 nikolab-pn

@marvinLaubenstein, any info when this might be fixed?

nikolab-pn avatar Jan 10 '23 08:01 nikolab-pn