# Enable touch actions on mobile over the p5js canvas itself

**URL:** <https://discourse.processing.org/t/enable-touch-actions-on-mobile-over-the-p5js-canvas-itself/49199>\
**Category:** Coding Questions\
**Created:** [August 18, 2026, 3:34pm UTC](https://discourse.processing.org/t/enable-touch-actions-on-mobile-over-the-p5js-canvas-itself/49199 "2026-08-18T15:34:15Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![dandan](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dandan](https://discourse.processing.org/u/dandan)\
**Post date:** [August 18, 2026, 7:13pm UTC](https://discourse.processing.org/t/enable-touch-actions-on-mobile-over-the-p5js-canvas-itself/49199/3 "2026-08-18T19:13:06Z")

</div>

tysm for your answer, and your welcome 🙂

this is a “handle inputs locally” type of approach, and while it’d allow to create custom functions for zooming and scrolling within the canvas, it wouldn’t help with browser-based gestures like pull to refresh, or scroll to make the url bar disappear (which I admittedly didn’t mention as something I’m after, my bad).

the reason I asked here is specifically because I’ve found posts that ask the exact opposite question, meaning how to _disable_ all of these touch controls, like [this one](https://discourse.processing.org/t/disable-pinch-zoom-on-mobile/36100), [this other one](https://discourse.processing.org/t/disable-scrolling-on-mobile/20719), or even a third one (that I can’t link because my account is too recent) which is called _“Restricting touches to be used by P5.js and not the browser: possible?”._

these posts are all from 2020-2023, so could this possibly have something to do with the V2 of p5js?

thanks again!

_edit : converted my js to p5js v1 and now it all works fine, so I guess that’s one way to get it done, but now gotta deal with v1 issues that were fixed in v2_ 🙃

---

_[View the full topic](https://discourse.processing.org/t/enable-touch-actions-on-mobile-over-the-p5js-canvas-itself/49199)._
