HtmlEditor javafx lose focus

时间:2016-03-04 18:14:34

标签: java javafx

Any time I use setHtmlText method the HtmlEditor loses focus. How can I fix this?

htmlEditor.addEventHandler(KeyEvent.KEY_RELEASED, new EventHandler<KeyEvent>() {
    @Override
    public void handle(KeyEvent event) {
        htmlEditor.setHtmlText(stripHTMLTags(htmlEditor.getHtmlText()));
        htmlEditor.requestFocus();
    }
});

I have tried this but still not working.

0 个答案:

没有答案