F0rce/ace

Calling focus on AceEditor is not working

danijelz opened this issue · 2 comments

Describe the bug
After calling focus there should be a blinking cursor in the field but it seems like focus method doesn't have any effect.

Snippet To Reproduce the problem

public class TestEditor extends VerticalLayout {
    public TestEditor() {
        var ace = new AceEditor();
        addAndExpand(ace);
        ace.focus();
    }
}
F0rce commented

Sorry for the lack of support recently,

I was able to fix your issue. With Lit-Element as Frontend the vaadin .focus() doesnt work. I created a overwrite that calls a function in the frontend, which sets the focus on the textinput perfectly.

I'll try to contribute as much as I did some time ago to the ace editor to bring you the best experience...

Sorry again for the wait,
David

I tested and closed issue. Works perfectly.