Disable pull to request on a plugin page

Disable pull to request on a plugin page

by Adrián Rodríguez -
Number of replies: 2

Hello, 

I am working on enabling the https://moodle.org/plugins/mod_treasurehunt plugin in the mobile app, and the main game interface is map based. Is there a way to disable the pull to request on a specific page of the plugin so that users can move around the map?

Thanks in advance

Average of ratings: -
In reply to Adrián Rodríguez

Re: Disable pull to request on a plugin page

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Hi Adrián,

unfortunately right now there is no way to disable it. I opened an issue to support it:

https://tracker.moodle.org/browse/MOBILE-3445

Cheers,
Dani
In reply to Dani Palou

Re: Disable pull to request on a plugin page

by Adrián Rodríguez -

Hi Dani,

Thanks for opening a issue. At the moment, I have used this workaround so that the event doesn't reach PTR component:

// touchmove handler
function process_touchmove(ev) {
  ev.preventDefault();
  ev.stopPropagation();
}

const map = document.getElementById("map");
map.addEventListener("touchmove", process_touchmove, false);