WebViewer selecting Mobile UI for IE touch laptops

182 views
Skip to first unread message

Matt Parizeau

unread,
Feb 11, 2016, 2:21:10 PM2/11/16
to pdfnet-w...@googlegroups.com
Q:

We have noticed that your web viewer gives a different UI experience in IE11 for users that have a touch screen laptop vs users that have IE11 on a non-touch screen laptop.  Is there away to force the same default UI experience regardless if its a touch screen laptop or not?

A:

The default behavior of WebViewer is that if it detects a touch device then it uses the mobile viewer UI.  To change this you can make the following change before calling the PDFTron.WebViewer constructor:
PDFTron.WebViewer.prototype.isMobileDevice = function() {
 
return false;
};


Please note though that this will no longer detect mobile devices and will always choose the best type specified in WebViewer's type option.  For example if you set type to "html5,html5Mobile,silverlight" then html5Mobile will never be selected since html5 is checked first (and will pass).  What you could is have your own custom device detection and then set the type option when creating WebViewer based on that.  So if you detect an IE touch laptop then you could set type: html5 and if you detect an IE mobile device that you want to use the mobile UI you could set type: html5Mobile.
Reply all
Reply to author
Forward
0 new messages