F0rce / ace

Ace Editor for Vaadin 14 & 23
MIT License
27 stars 13 forks source link

Calling focus on AceEditor is not working #6

Closed danijelz closed 3 years ago

danijelz commented 3 years ago

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 3 years ago

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

danijelz commented 3 years ago

I tested and closed issue. Works perfectly.