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

Can't type 'enter' in text editors inside dialogs #5802

Open
yuvipanda opened this Issue Dec 23, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@yuvipanda
Copy link
Contributor

yuvipanda commented Dec 23, 2018

If a CodeEditor (in my case, a JSONEditor) is placed inside a Dialog, you can not create a newline in the code editor with the enter key. This seems to be because the Dialog unconditionally catches the 'Enter' (#1652) and doesn't let the event go to the editor itself.

@yuvipanda

This comment has been minimized.

Copy link
Contributor

yuvipanda commented Dec 24, 2018

The modal dialog should only handle events that haven't been already handled by any of its child nodes. So a full featured text editor can trap enter / esc / tab, but a radio button / single-line text box might not.

@jasongrout pointed out

node.addEventListener('keydown', this, true);
as a possible culprit.

@jasongrout

This comment has been minimized.

Copy link
Contributor

jasongrout commented Dec 24, 2018

In particular, the event handlers are registered for the capture phase, so the events never get down to the elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment