Scrolling down the Text area to enable the checkbox sometimes fails for mobile devices

Hi everyone,

I have set up a checkbox that will enable itself when a text area is fully scrolled, and it works fine for PC but I couldn’t get it to work 100% of the time on mobile. Sometimes I need to scroll down a couple more times, sometimes I need to click on the text area first then scroll down, I don’t really know what causes this issue. Here’s the javascript I used if anyone can help me take a look at it, thank you.

function checkScrollEnd(cls){
var textarea = document.querySelector(‘.’ + cls + ’ > span > span > textarea:first-of-type’);
if(textarea) {
textarea.addEventListener(‘scroll’,setFlg.bind(this));
}
textarea.readOnly = “true”
function setFlg() {
var scrollHeight = textarea.scrollHeight;
var scrollTop = textarea.scrollTop;
var clientHeight = textarea.clientHeight;

if (scrollHeight - scrollTop < clientHeight + 2) {
if (cls == “ScrollCheck”) {
var elementInd = document.querySelector(‘input[type=“checkbox”][name=“checkboxenable”]’);
if (elementInd) {
elementInd.removeAttribute(‘disabled’);

}
}
}
}

@piekd @Mateusz could you help with this Mobile question?

@LouisY16949431 I would suggest that you log this as a support incident via the MSP. Please provide the INC ticket id here so that we can help track it.

Check Box in repeating dynamic layout is not working in IPAD