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

Enter is not working in editor #5891

Closed
RomanNikitenko opened this issue Aug 8, 2019 · 6 comments · Fixed by #5892
Closed

Enter is not working in editor #5891

RomanNikitenko opened this issue Aug 8, 2019 · 6 comments · Fixed by #5892
Assignees
Labels
bug bugs found in the application critical critical bugs / problems editor issues related to the editor help wanted issues meant to be picked up, require help

Comments

@RomanNikitenko
Copy link
Contributor

Description

Enter is not working in editor

Reproduction Steps

Open some file and try to use Enter button.

OS and Theia version:
Ubuntu 18.04. Chrome.
0953ba7

@RomanNikitenko RomanNikitenko added the bug bugs found in the application label Aug 8, 2019
@vince-fugnitto vince-fugnitto added the editor issues related to the editor label Aug 8, 2019
@azatsarynnyy
Copy link
Member

reproduced on my side, also

@vince-fugnitto
Copy link
Member

I believe it's caused during #5865

@akosyakov akosyakov added the critical critical bugs / problems label Aug 8, 2019
@akosyakov
Copy link
Member

@vince-fugnitto Could you try before 0953ba7 please to confirm?

@akosyakov
Copy link
Member

@vince-fugnitto you are right, looking at addKeyListener: https://github.com/theia-ide/theia/blob/b40a8d54380524dd1a8b05992ebf540b68806e92/packages/core/src/browser/widgets/widget.ts#L206-L209

We should add return statements, i.e.

    protected handleEscape(event: KeyboardEvent): boolean | void {
        const dialog = this.currentDialog;
        if (dialog) {
            return dialog['handleEscape'](event);
        }
        return false;
    }

    protected handleEnter(event: KeyboardEvent): boolean | void {
        const dialog = this.currentDialog;
        if (dialog) {
            return dialog['handleEnter'](event);
        }
        return false;
    }

Could someone do a PR please?

@akosyakov
Copy link
Member

Also here: f48398e

we should do return false after if

@vince-fugnitto
Copy link
Member

@vince-fugnitto Could you try before 0953ba7 please to confirm?

Yes I tried earlier, both 0953ba7 and HEAD~1 and the problem was in 0953ba7

@akosyakov akosyakov added the help wanted issues meant to be picked up, require help label Aug 8, 2019
@vince-fugnitto vince-fugnitto self-assigned this Aug 8, 2019
vince-fugnitto added a commit that referenced this issue Aug 8, 2019
Fixes #5891

- fixes an issue where the `enter` key no longer works in the editor.
- caused by a regression present in the `dialog.ts#handleEnter` method
which was not returning `false` if a dialog was not present.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 8, 2019
Fixes #5891

- fixes an issue where the `enter` key no longer works in the editor.
- caused by a regression present in the `dialog.ts#handleEnter` method
which was not returning `false` if a dialog was not present.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 8, 2019
Fixes #5891

- fixes an issue where the `enter` key no longer works in the editor.
- caused by a regression present in the `dialog.ts#handleEnter` method
which was not returning `false` if a dialog was not present.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 8, 2019
Fixes #5891

- fixes an issue where the `enter` key no longer works in the editor.
- caused by a regression present in the `dialog.ts#handleEnter` method
which was not returning `false` if a dialog was not present.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application critical critical bugs / problems editor issues related to the editor help wanted issues meant to be picked up, require help
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants