ESC key has to be hit twice to close modal window

What’s The Bug?

When modal window is opened and ESC key is hit, caret disappears instead of closing modal. When hitting ESC again modal closes. Goes same when search pane is opened.

How To Reproduce It

  1. Open Sets > Notes.
  2. Click “+ New Object” to open modal window and check that caret exists.
  3. Hit ESC key and see that caret disappears instead of modal closes.
  4. Hit ESC key again and see that modal closes. This is what expected in step 3.

  1. Open Sets > Notes.
  2. Click “+ New Object” to open modal window and check that caret exists.
  3. Hit ⌘ + S to open search pane and check that caret exists in text box.ists.
  4. Hit ESC key and see that caret disappears instead of search pane closes.
  5. Hit ESC key again and see that search pane closes. This is what expected in step 4.

Image or Video

The Expected Behavior

Modal window or search pane closes by a single hit of ESC key.

Device

MacBook Air M2, 2022

OS

Sonoma 14.3.1 (23D60)

Anytype Version

v0.38.0

Technical Information

OS version: darwin arm64 14.3.1
App version: 0.38.0
Build number: build on 2024-01-23 17:45:05 +0000 UTC at #c71c64146c6e721ac39e01d450f38db5e6963f2e
Library version: v0.30.12
Anytype Identity: A74WvtiwAfxgT5gqqKG8dK72ovkH5DPHfV3QYEAeqQfXdr1y
Analytics ID: 6fc28434-3efc-4e3f-8f26-7bffce30393c
Device ID: 12D3KooWNkfkdyckCUVLXiFPVJj1h3CJR82PFGeHfdHU9FQnggHm

Hi @takuyahara

This is working as intended. Pressing the ‘Escape’ key lets you shift focus away from a block and stay within the popup. Similarly, if you have multiple blocks selected, pressing ‘Escape’ will deselect them.

Consider making a feature request if you have an alternative solution in mind.

1 Like

@Angelo Thanks for your response, I flag this post solved since I understood the behavior is by design. But I still want it changed, so I made a request here.

2 Likes