# mouseWheel in Safari not active?

**URL:** https://discourse.processing.org/t/mousewheel-in-safari-not-active/7428
**Category:** Coding Questions
**Created:** [January 11, 2019, 8:27pm UTC](https://discourse.processing.org/t/mousewheel-in-safari-not-active/7428 "2019-01-11T20:27:07Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![maxbatt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maxbatt/32/5204_2.png) [@maxbatt](https://discourse.processing.org/u/maxbatt)
#### Post date: [January 11, 2019, 8:27pm UTC](https://discourse.processing.org/t/mousewheel-in-safari-not-active/7428/1 "2019-01-11T20:27:07Z")

</div>

Hello all!

Just signed up today and excited to be part of the forum. I am wondering if there is a way to activate mouseWheel in safari? For me, the [example at p5.org](https://editor.p5js.org/projects/S1w4g9gT) doesn’t work in safari, and the [page I am trying to build](https://www.exosf.io/sitexp/index3.html) works in Chrome, but not safari.

Thank you for any tips in advance !!

---

<div class="post-metadata">

### Author: ![Pr0tonX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/pr0tonx/32/2590_2.png) [@Pr0tonX](https://discourse.processing.org/u/Pr0tonX)
#### Post date: [January 11, 2019, 11:44pm UTC](https://discourse.processing.org/t/mousewheel-in-safari-not-active/7428/2 "2019-01-11T23:44:29Z")

</div>

I think that the mouseWheel() event isn’t well supported by Safari, and others brothers actually ; it’s not a standard : [https://developer.mozilla.org/en-US/docs/Web/API/MouseWheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseWheelEvent)  
Moreover, using mouseWheel() with event.delta can creates troubles, because the scroll of the mouse can be inverted by users in their settings and I also think that the Mac scroll and Windows / Linux scroll aren’t in the same direction, so values can be negatives instead you expected positives values

---

<div class="post-metadata">

### Author: ![maxbatt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maxbatt/32/5204_2.png) [@maxbatt](https://discourse.processing.org/u/maxbatt)
#### Post date: [January 12, 2019, 2:16am UTC](https://discourse.processing.org/t/mousewheel-in-safari-not-active/7428/3 "2019-01-12T02:16:15Z")

</div>

Understood! Thank you so much for the reply. Do you have any alternative suggestions on how to achieve such an effect?

Basically I am trying to have a sketch that is aware of the current scroll position. Obviously there are ways to do various jQuery scroll tracking, but I hadn’t seen an effective way to do it with p5.

Thanks again!!

---

<div class="post-metadata">

### Author: ![maxbatt](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/maxbatt/32/5204_2.png) [@maxbatt](https://discourse.processing.org/u/maxbatt)
#### Post date: [January 12, 2019, 2:45am UTC](https://discourse.processing.org/t/mousewheel-in-safari-not-active/7428/4 "2019-01-12T02:45:16Z")

</div>

FWIW I just tried the scroll event and it appears this isn’t working on Safari either.

---

<div class="post-metadata">

### Author: ![Pr0tonX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/pr0tonx/32/2590_2.png) [@Pr0tonX](https://discourse.processing.org/u/Pr0tonX)
#### Post date: [January 12, 2019, 5:24pm UTC](https://discourse.processing.org/t/mousewheel-in-safari-not-active/7428/5 "2019-01-12T17:24:01Z")

</div>

Unfortunately, I don’t know how to do, even with JQuery wich get the positions of html element, relative to the scrollbar position I think. I don’t know if it can be apply for a canvas…  
But if someone else has a solution I also would be glad to hear it !

---

<div class="post-metadata">

### Author: ![calornorte](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/calornorte/32/6066_2.png) [@calornorte](https://discourse.processing.org/u/calornorte)
#### Post date: [August 10, 2019, 10:29pm UTC](https://discourse.processing.org/t/mousewheel-in-safari-not-active/7428/6 "2019-08-10T22:29:52Z")

</div>

hello!  
I’m dealing with the same issue, I found roll.js, an incredible efficient, small library for javascript  
however I don’t have a clue about how to implement it on p5.

any other thoughts?
