# How to have a p5 sketch continue to run while not in the selected tab?

**URL:** <https://discourse.processing.org/t/how-to-have-a-p5-sketch-continue-to-run-while-not-in-the-selected-tab/13476>\
**Category:** Coding Questions\
**Created:** [August 19, 2019, 3:13pm UTC](https://discourse.processing.org/t/how-to-have-a-p5-sketch-continue-to-run-while-not-in-the-selected-tab/13476 "2019-08-19T15:13:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [August 19, 2019, 3:13pm UTC](https://discourse.processing.org/t/how-to-have-a-p5-sketch-continue-to-run-while-not-in-the-selected-tab/13476/1 "2019-08-19T15:13:22Z")

</div>

I am making a p5 sketch, and I want it to be able to run while it is in the background, but whenever its tab is not selected, it pauses. How do I fix this?

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [August 19, 2019, 4:09pm UTC](https://discourse.processing.org/t/how-to-have-a-p5-sketch-continue-to-run-while-not-in-the-selected-tab/13476/2 "2019-08-19T16:09:42Z")

</div>

What browser / browser version no. are you using?

---

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [August 19, 2019, 5:47pm UTC](https://discourse.processing.org/t/how-to-have-a-p5-sketch-continue-to-run-while-not-in-the-selected-tab/13476/3 "2019-08-19T17:47:30Z")

</div>

I am using firefox 68, and this also happens with the latest version of chrome.
