Scroll Issues With Tablet:

PDF.js Express Version

UI version 7.3.0
Core version 7.3.2
Build My8yMi8yMDIxfDQwM2IyMDFjNg==
WebViewer Server false
Full API false

Detailed description of issue
Hello, simple question / request here. When using the PDF viewer on tablet, our users and testers are all having a terrible experience with scrolling PDFs. When you press down and try to scroll up or down, most of the time it creates a selection box instead of actually scrolling the PDF as expected. Sometimes you can scroll it properly by making a quick flicking motion on the touch screen, but the overall experience is very clunky this way.

I have a tried disabling / enabling a variety of features using WebViewerInstances.disableFeatures, but cannot seem to turn off the ‘selection box’ that appears by default when click + dragging. We have no need for this selection box at all for the tablet version, so any way that we can disable this feature would be a quick and easy fix for us. Please advise,

This issue doesn’t come up when using on the desktop, because users are using the scroll wheel or sidebar.

Expected behaviour
All click and drag behaviour on touchscreen results in scrolling the PDF, and NEVER creates a selection box instead

Does your issue happen with every document, or just one?
Any document

Code snippet

Not relevant

Thanks in advance, I’m hoping there is a quick fix for this,

Scott

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi Scott,

I don’t have a tablet to test on myself, but using chrome dev tools and version 7.3.9 it does seem when in tablet mode it does default to the pan tool instead of select. Were there any specific tablet environments that we’re giving you an issue? Can you try upgrading to 7.3.9 and see if the problem persists.

Also if you don’t need the annotation select tool at all you can do something like the following to always default to the pan tool and remove the annotation select tool:

 const {docViewer} = instance
 instance.disableTools(['AnnotationEdit']);
 instance.setToolMode('Pan');


  docViewer.on('toolModeUpdated', (annot)=> {
    if(annot.name === 'AnnotationEdit'){
        instance.setToolMode('Pan');
    }
  })

Cheers,
Dustin

Hey there,

We made some improvements to mobile scrolling in 8.0 which may be worth trying out as well.

Here is a migration guide

Thanks!
Logan

Thanks for the responses! For our first release we’ve achieved a satisfactory solution with the first answer by manually changing the tool mode to ‘Pan’ as suggested.

For release two we will look into migrating to the newer version,

Scott

1 Like