Forum Discussion

kristinaArg's avatar
kristinaArg
Community Member
3 months ago
Solved

Text entry showing two scroll bars

Hi, I have a multi-line text entry box, and initially, the scroll bar wouldn’t appear when the text exceeded the box size. To fix this, I added a JavaScript script to enable scrolling. While i...
  • Nedim's avatar
    Nedim
    3 months ago

    Hi Kristina,

    For some reason, the JavaScript code works only when the text entry box is on the base layer. It does not function as expected when the text entry box is on another layer. To fix this, try executing the following code when the timeline starts on this layer:

    const textAreas = document.querySelectorAll('textarea');
    
    textAreas.forEach(textArea => {
        textArea.style.scrollbarWidth = 'thin';
    });
    
    setInterval(() => {
        const mS = document.querySelectorAll('.micro-scrollbar');
        mS.forEach(m => {
            m.style.display = 'none';
        });
    }, 100);
    


    Note: When testing, please avoid randomly pressing keys too quickly, as typing too fast may momentarily break the code when the scrollbar is activated.