It would be nice to have a workflow action in the elements section that would be for the page. Specifically one to stop the page from scrolling.
or to make an element scroll
If you want to do that, for now there is the ability to run a javascript code. I am actually in the process of trying to apply this for the purposes of stopping the page from scrolling.
Check out this appâŚit has some javascript as well as HTML examples of how to customize the scroll bar appearance.
I put something together that seems to be working for me. I am using this javascript in the trigger javascript workflow action
$(document).ready(function(){
$(â#pageâ).css(âheightâ,â100pxâ);
$(â#pageâ).css(âoverflow-xâ,âhiddenâ);
});
This is done when my overlay group that blurs the background of page and displays a loading wheel (you can use overlay groups to act like popups but takes a bit of effort) is visible. This effectively stops the page from scrolling and interestingly doesnât cut the content offâŚI can see the full content of according to the browser height.
Then when the overlay group is not visible I run this javascript.
$(document).ready(function(){
$(â#pageâ).css(âheightâ,â1240pxâ);
$(â#pageâ).css(âoverflow-xâ,âhiddenâ);
});
My page in the editor is built to be 1240px in height, so this is setting it to its original value. I am using this on a search results page with repeating groups that have dynamic heights. What is interesting is as the height of the repeating group increases, the javascript setting page height doesnât stop the page from increasing accordingly.
This has effectively gotten my page to stop scrolling as my repeating groups are loading results from the search.
Still would be nice to just have a simple workflow though and really be no-code.
I do similar with a HTML element and some css.
I have the data for the HTML element empty by then have a condition linked to a state that says when the state (letâs say toggleStopscroll) is yes
HTML data =
Also the element is must be stopscroll which on this occasion would be the page.
I also use it when using re usable popups which donât always stop the page behind from scrolling or as you said when making your own popup
Actually what you have presented might be a little different I will check it out a little later when Iâm by my computer
Iâd be interested in seeing a screen shot of that HTML element with the code. I have not had any luck getting an HTML element to stop the scroll, which I would rather as I believe it would be more efficient than running a workflow to trigger Javascript.
Itâs pretty simple css punch in the following (minus all the >)
#stopscroll{ position: fixed !important; }
Thanks for that. I have a couple questions.
-
Is the page given an id of âstopscrollâ?
-
Is there any need for or anything else in the HTML or just simply the
#stopscroll{ position: fixed !important; }
as above?
Cheers
Ah gee sorry you need
<script> </script>
before and after and yes assign stopscroll to the page.
I canât remember if I added Cssify plugin
Hey Chad
When using the HTML you put up, I have successfully gotten the page scroll to stop. The issue I am having now is that I use this function in my header. I have it floating often and on a page that a user is scrolling, and then triggers the HTML through the floating header, the page does stop scrolling, but it first scrolls to the top.
After the HTML is removed through conditionals and the page can be scrolled again, it is at the top of the page still and does not automatically scroll back to its position at the time the HTML was triggered.
Do you experience the same thing? If so, have you figured a way to get the page to scroll back to the position it was at?
I thought about storing the âcurrent page scrolling positionâ and then using the scroll to workflow action, but that is only capable of scrolling to an element and not a page position.
I use the code in a HTML element which is blank but the condition has the code.
I havenât experienced what you talking about. For me the page would just stop scrolling
Hi @chad & @boston85719,
I tried everything possible to stop the extra white spacing appear but canât make it work.
Can one of you show me how did you set it up? a screenshot of the HTML would be great too. Also, did you have to install Cssify plugin too?
Any help would be great!
It looks like this is still an open issue for some? I too would like to have more control over my page scrolling. However, Iâm a non-technical user with very limited ability to use code. Can someone direct me, and perhaps others, to a clear example or tutorial on how exactly one can prevent their screen from scrolling. I, would greatly appreciate it and Iâm sure others will too.