HelloZeroNet / ZeroNet

ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.io
Other
18.35k stars 2.27k forks source link

Disable pull to refresh on all sites. #2058

Open styromaniac opened 5 years ago

styromaniac commented 5 years ago

Chrome's pull to refresh is annoying. Have it disabled with:

body{ overscroll-behavior-y:none;

}

Then make the 0 button able to be pulled down to refresh the page.

Scrolling up on ZeroHello for instance sometimes causes a page refresh and I find this problem unavoidable until the CSS above is added.

It's a mobile device problem.

0polar commented 5 years ago

Toggle in chrome://flags/#disable-pull-to-refresh-effect

styromaniac commented 5 years ago

Toggle in chrome://flags/#disable-pull-to-refresh-effect

"No matching experiments"

krzysztof113 commented 5 years ago

Maybe: chrome://flags/#pull-to-refresh

HelloZeroNet commented 5 years ago

I did tried to reproduce the problem (Android + Chrome 75.0.3770.101), but for me it's works as for any other site. So for you the pulldown animation sometimes happens even if you are not scrolled to the top?

styromaniac commented 5 years ago

Correct.

styromaniac commented 5 years ago

chrome://flags/#pull-to-refresh

Not seeing it appear.

styromaniac commented 5 years ago

It's reproducible with fast scrolling action on ZeroHello. I think the CSS alone should be added as stated in OP. The 0 button will refresh ZeroHello anyway.

For other sites, if this CSS is a minor inconvenience, then hitting 0 and then back will work just fine for refresh if in App 0 or a Progressive Web App.

That's less coding to do.

body{ overscroll-behavior-y:none;

}

styromaniac commented 5 years ago

See, the Chrome bug also occurs with GitHub when using Chrome in normal browser mode, so it's a huge issue.

HelloZeroNet commented 5 years ago

I have added it to ZeroHello body, but if it's also happening on github, then I think it won't help. https://github.com/HelloZeroNet/ZeroHello/commit/4230ab1d394826547fbfab79117492a48414a068

styromaniac commented 5 years ago

Not working. It works on my sites. Something is missing for ZH.

I don't expect a GH fix.

0polar commented 5 years ago

I am sure that the flag exists in Chrome 68. The flag is removed in newer version? You can use Firefox instead.

styromaniac commented 5 years ago

The web developer is responsible for making a more correctly behaving mobile layout to an extent. Either it needs more study for preventing the bug or needs to be reported to the browser developer.

styromaniac commented 4 years ago

html{overflow:hidden}

It looks like this is the standard way to do it. Disregard my earlier comments. This works on my ZeroMe clone.