Unresponsive scroll bar on textbox | XM Community
Skip to main content

Unresponsive scroll bar on textbox

  • August 10, 2022
  • 1 reply
  • 102 views

Forum|alt.badge.img

Hi, I'm trying to add a scrollbar on my text box and have used HTML code to try to do so but when I click preview on my survey, the text is cut off at 30vh and there is no scrollbar. Here is the code I'm using:


I've also tried to use this version to no avail:
< div style="max-width:100%;width:100%;height:50vh;overflow:auto;border:1px solid black;padding:2%">
Hope someone can help! Thank you

1 reply

bgooldfed
Level 4 ●●●●
Forum|alt.badge.img+25
  • Level 4 ●●●●
  • 179 replies
  • August 10, 2022

Hi sidhikat,
It's a bit tricky to debug this without knowing how this div is attached to the document but here are some initial thoughts:

  • Does using a multi line text box solve this for you? It seems to behave as you've described.

  • image.pngIs there a reason you cannot style the textbox directly (either with CSS or jQuery) rather than add a div? I suspect you're having issues with inheritance, which is why the width is being constrained to 30vh.

  • Lastly, I think you want to apply the scrolling behaviour to a textarea element, not a div:





Output:
image.png
Good luck!


Leave a Reply