Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Turning off, swipe down to refresh gesture, via a script

  • 1 amsa
  • 0 sa na da wannan matsala
  • 9 views
  • Amsa ta ƙarshe daga Paul

more options

I'm using Fennec Firefox on mobile and I'm having this problem where my the page refreshes on the slightest touch. I'd like to turn this gesture off all together. I have done some research and found this code: document.addEventListener('touchstart', function(event) {

   // Check for a swipe down gesture to prevent refresh action
   if (event.touches.length > 0) {
       // Prevent default action
       event.preventDefault();
   }

}, { passive: false });

document.addEventListener('touchmove', function(event) {

   // Prevent default action to avoid refresh
   event.preventDefault();

}, { passive: false }); I put it into a java script extension and it worked, but then I wasn't able to scroll up or down. I don't know anything about java or python, so if someone could give me a hint or point me in the right direction that would be helpful. I am also looking through the source code of Firefox looking for answers.

I'm using Fennec Firefox on mobile and I'm having this problem where my the page refreshes on the slightest touch. I'd like to turn this gesture off all together. I have done some research and found this code: document.addEventListener('touchstart', function(event) { // Check for a swipe down gesture to prevent refresh action if (event.touches.length > 0) { // Prevent default action event.preventDefault(); } }, { passive: false }); document.addEventListener('touchmove', function(event) { // Prevent default action to avoid refresh event.preventDefault(); }, { passive: false }); I put it into a java script extension and it worked, but then I wasn't able to scroll up or down. I don't know anything about java or python, so if someone could give me a hint or point me in the right direction that would be helpful. I am also looking through the source code of Firefox looking for answers.

All Replies (1)

more options

Hi

Does this happen in an official build of Firefox for Android from the Google Play store?

Yi tambaya

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.