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

Поиск в поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

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

  • 4 ответа
  • 0 имеют эту проблему
  • 40 просмотров
  • Последний ответ от niahmt20

дополнительные действия

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.

Выбранное решение

Hi

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

Прочитайте этот ответ в контексте 👍 0

Все ответы (4)

дополнительные действия

Выбранное решение

Hi

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

дополнительные действия

It happened on firefox nightly as well. That build was from github though. I don't download anything from the google playstore unless it's something like, my banking apps. It could be my phone that is the issue, I found some code that works in conjunction with the 'Run Javascript' extension. It didn't always act this way, this has been going on for a couple weeks now.

дополнительные действия

Thank you for helping to test the Nightly build.

What happens when you turn off "pull to refresh" in the "Customise" section of the Firefox for Android settings menu?

дополнительные действия

That did the trick. Thank you for the help.

Задать вопрос

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.