fixed the js error when determining scrollable