This is a migrated thread and some comments may be shown as answers.

Cannot listen for any touch or gestures on embedded pdf

1 Answer 61 Views
Touch
This is a migrated thread and some comments may be shown as answers.
Marlon
Top achievements
Rank 1
Marlon asked on 19 Sep 2016, 02:41 PM

Example Dojo: http://dojo.telerik.com/@mharrison/OjITI/2

I'm trying to allow for pinch/zoom gestures on a pdf that I've embedded into a MobileView but nothing I've tried has allowed me to listen for touchstart/touchend on iOS devices. it took alot of trial an error to devise this solution between browsers using the iframe and mobile safari needing the embed tag to allow for scrolling in the pdf.  I even tried applying a kendo touch to the embed tag on init of the view but that throws a javascript error. What am I doing wrong?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 21 Sep 2016, 12:53 PM
Hello Marlon,

After inspecting the provided example, I noticed that if the src attribute is set directly in the HTML, not through the view model the touchstart and touchend events are thrown correctly. I can assume that the issue is caused because when the src attribute is set in a later state via the data-binding, this is causing an issue with the event handlers.

I modified the example to demonstrate this implementation:

http://dojo.telerik.com/ovUPE

I hope this will help you to achieve the desired result.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Touch
Asked by
Marlon
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or