med-material / r-shiny-js-data-capture

Data Capture System in Javascript, integrated into R Shiny
MIT License
1 stars 1 forks source link

Data Capture: Use universal scroll event #17

Closed bastianilso closed 1 year ago

bastianilso commented 1 year ago

Currently the data capture system is relying on wheel events to determine scrolling but wheel is specific to mouse devices and will not capture scrolling on a touch device. For all devices we can use the scroll event. However, something in mouselog() might currently be breaking, at least we dont see events in the event csv when using scroll. so will need to do some debugging there.

See working examples in the API from MDN: https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event

bilal-62210 commented 1 year ago

@bastianilso it's ok for the pageX and pageY on the computer, can you update the server please, i want to see if it's good too on phone.