244
Views
7
Comments
How to enable scroll bars for textarea when it is disabled?
Question
Application Type
Reactive

How to enable scroll bars for TextArea when it is disabled? 

2022-08-03 04-32-50
Ravi Punjwani

Hi Preeti,

Here's a nice example of scrollbars on textarea

https://way2tutorial.com/html/example/textarea_scrollbar_hide_show_example.php


In short, you might need to add following CSS

overflow:scroll


It doesn't matter if your textarea is enabled or disabled.

UserImage.jpg
Preeti M

Hi Ravi, 

Yes in TextArea OutSystems provide scrollbar if texts are lengthy.

As per you suggestion I already tried this  but scrollbar is not working while disabled the  TextArea .

2022-08-03 04-32-50
Ravi Punjwani

Here's a quick example specific to your requirement.

https://jsfiddle.net/wgetnkhb/1/

In the above example that I created, you can try out all 3 version of textarea settings.

Is there any specific reason you want to disable the textarea? If you want to just block the user input, make it readonly instead of disabled. Disabled controls on a web page are ignored by the Form Submit (too technical HTML). But in general, avoid enable disable if you're only looking at controlling the readonly feature.

However, the scrolls should work regardless of using readonly or disabled.

If possible share your URL so I can check the behaviour and suggest what's wrong with your textarea.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Preeti,

A disabled element is visible, but cannot receive any user input, and so doesn't interact with mouse or keyboard. Since the scroll bar is part of the element, if you disable the input box, the scroll bar is also disabled. I would suggest you use read-only instead of disabled, so the scrollbar will work again. If needed, you can style the input box to make it look like it's disabled.

2018-08-27 08-29-35
Fábio Vaz

Hello,

You can use Outsystems UI component:

Out of the box component supported by Outsystems

UserImage.jpg
Preeti M

This widget has another uses but I want inside textarea widget

2018-08-27 08-29-35
Fábio Vaz

But you can use it in a textarea too, it works in every element ;)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.