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

Escape doesn't close cell overlay consistently #910

Open
lukasmasuch opened this issue Feb 27, 2024 · 2 comments · May be fixed by #915
Open

Escape doesn't close cell overlay consistently #910

lukasmasuch opened this issue Feb 27, 2024 · 2 comments · May be fixed by #915
Labels
package:core Requests related to the core package type:bug Something isn't working

Comments

@lukasmasuch
Copy link
Collaborator

lukasmasuch commented Feb 27, 2024

If you open a cell and press Escape, it closes the cell overlay. But if you click inside the cell (if it is readonly), escape will do nothing:

Screen.Recording.2024-02-27.at.10.07.25.mov

Is there a reason for this? It would probably be more consistent if esc always closes the cell overlay.

@lukasmasuch lukasmasuch added type:bug Something isn't working package:core Requests related to the core package labels Feb 27, 2024
@huang47
Copy link

huang47 commented Feb 27, 2024

I also ran into this issue where escape does noop like what @lukasmasuch mentioned

@BrianHung
Copy link
Collaborator

BrianHung commented Mar 8, 2024

This is probably a bug. What happens when the text cell is readonly and you try clicking on it, because the textarea is disabled, focus is transferred from canvas to body. And then onKeyDown doesn't work anymore to escape the editor.

We would probably need a focus trap for this (?). We can use the readonly attribute for input and textarea to be able to keep focus but disable editing.

CleanShot.2024-03-08.at.15.30.14.mp4

@BrianHung BrianHung linked a pull request Mar 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:core Requests related to the core package type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants