hammadsaedi / regex-pro

Regex Pro is a regular expression tester. It allows you to test your regular expressions against a string of your choice.
https://hammadsaedi.github.io/regex-pro/
MIT License
6 stars 17 forks source link

Textarea Should Not Display Scroll Bar and Automatically Resize #15

Closed hammadsaedi closed 1 year ago

hammadsaedi commented 1 year ago

Currently, the textarea element displays a vertical scroll bar even when the text content does not exceed the visible area. Additionally, the textarea has a fixed size, which may not be ideal for dynamic or variable-length text. This issue is about addressing both of these concerns.

image

Expected Behavior

No Scroll Bar:

The textarea should not display a vertical scroll bar when the text content does not exceed the visible area. In other words, if the content fits within the visible area, there should be no scroll bar visible to the user.

Dynamic Sizing:

The textarea should automatically adjust its height to accommodate the content. When the user enters text, the textarea should expand vertically to display the entire text without the need for a scroll bar. Conversely, if the user deletes text, the textarea should shrink to fit the remaining content.

Proposed Solution: To resolve this issue, you may consider using CSS to style the textarea with the following properties:

textarea { overflow-y: hidden; /* Hide the vertical scroll bar */ height: auto; /* Allow the textarea to adjust its height based on content */ } By applying these styles to the textarea, you can achieve the desired behavior. Additionally, you may need to handle the dynamic resizing of the textarea with JavaScript to ensure that it resizes based on the content entered by the user.

Virtual4087 commented 1 year ago

i would like to work on this issue

hammadsaedi commented 1 year ago

@Virtual4087 Best of luck