How to force-redraw a ui.textarea?



Currently hiding and showing, but would be great if there’s a better way?


could you show an example of what you are trying to do?


@harutyun, sure! So I’m working on this editor plugin where I have a ui.textarea whose height and width are 100% of its parent.

When resizing the editor (e.g., by dragging the splitter between panes), the ui.textarea doesn’t resize, so I’m currently handling this by handling the resize event on the editor, and hiding then showing the ui.textarea to get it to resize.

plugin.on("resize", function() {
    if (textarea) {
        textarea.setAttribute("visible", false);
        textarea.setAttribute("visible", true);

Let me know, if you need more details!


link to the plugin code would be very helpful, or at least a larger snippet which i could use to reproduce the issue


Thanks for looking into this, @harutyun You should be able to reproduce by commenting these lines out!


have you considered using ace instead of textarea to display hex code?


@harutyun, just wanted to keep things simple, you know, but would love to give it a try! Any particular example I should look at?


@kzidane we could do something like,output