Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Highlighted
alyssabrouse
New Contributor II

QlikSense grid scrolling on DOMMouseScroll

I have QlikSense mashup with straight tables & pivot tables embedded directly (via Capability API getObject calls).  The page (body) is scrollable, so the entire page scrolls via mousewheel scrolling.  Within other grid controls, when mousing/hovering over them, the grid content will scroll and the body will cease scrolling.  However, when hovering over QlikSense embedded straight- and pivot- tables, the grid does not scroll and the body continues to scroll. 

Previously I've accomplished my desired UX by handling the mousewheel DOMMouseScroll event like so:

var gridTables = $(elem).find('.qv-st-data table, .qv-pt .scroll-content');

if (gridTables.length > 0) {

      Bind the mousewheel event to grids and pivot grids (st & pt)

      gridTables.bind('mousewheel DOMMouseScroll', function (e) {

      var e0 = e.originalEvent,

      delta = e0.wheelDelta || -e0.detail;

      this.scrollTop += (delta < 0 ? 1 : -1) * 30;

      e.preventDefault();

   });

}


($(elem) is the HTML element containing the visualization.  30 for the scrollTop calculation is arbitrary, and just allows me to tweak the scroll sensitivity.)


This solution no longer works - delta is always 0.  My old solution may simply be a distraction though!  The point is...

Do you know of a way to allow the user to scroll within the QlikSense visualizations using the mouse wheel, when the HTML body also is scrollable?


Thanks!

Community Browser