richTextArea setReadOnly - not what I was expecting

Is there a way to disable editing the vaadin richtextarea\textarea but keep the vertical scroller when text longer than the component heigh?

if you add a text longer than the high of the component it will add the vertical scroll only if the component it is enabled .
I would expect to at least show the scroll even if the user can’t actually scroll he can figure out that there’s more hidden text.

I also tried setReadonly for the richtextarea - I didn’t expect it to remove the toolbar … I was actually sure that this it is what I need until I tested it. ironically it thorws exception if you add text from the code so I had to set readonly false before I add text and set readonly true again when I’m done - that would be ok (eventhough it doesn’t really make sense) unless it doesnt do what it is expected … I would again , expect to see the vertical scroller and let the user scroll down and read (read only)…

Hi Yinon,

when setting a RichTextArea to read only mode I believe that it is intended that the scrollbar should be visible. It looks like there has been a regression regarding this issue, please see I will create a new trac ticket regarding this issue.

Fortunately, there is a relatively simple workaround. Just add the following to your theme and the scrollbar should be visible in read only mode.

.v-richtextarea-readonly { overflow: auto; } I hope this works for you.

Best regards,


ridiculous and unnecessary! but works.

there is no documentation
about all those “hidden” behaviour (bottom and top toolbars will disappear, no vertical scroll)