Open SuperPhatArrow opened 1 year ago
@monlovesmango I think that inserting this into MainLayout.vue would do the trick.
thank you for this! I agree. I want to figure out how to capture this action and direct it do to something else, like reload/reset the UI but not completely reload the page. or even load unread feed events. do you have tips around this? if not no worries but if so it would prob help me implement faster.
Yes, it must be possible because the Twitter PWA does it. I will look into it, I imagine it will be adding an event listener to the element. I'll report back soon.
Ok I have figured it out and put together an ugly demo for you to try on your phone.
html, body { overscroll-behavior-y: contain; }
I needed to add body to the CSS to cancel the refresh.
All code is here including some overly commented JS which will hopefully explain everything! Any questions, please let me know.
oh wow thank you so much for this! will def put this in the next major release!!
When swiping down to scroll up at the top of the page, Chromium based mobile browsers (e.g. Chrome, Brave) default action is to refresh the entire site. This is not good behaviour for Astral as it has to fetch all new data from relays.
It can be overridden with the following CSS:
Reference