Sticky notes on iOS in an iframe

95 views
Skip to first unread message

Matt Parizeau

unread,
Aug 18, 2014, 1:40:31 PM8/18/14
to pdfnet-w...@googlegroups.com
Q: 

Using the HTML5 mobile viewer I'm unable to enter text into sticky note annotations. We also are using mobileRedirect: false so the viewer is inside an iframe.

A:

One of the reasons why we default to redirecting the mobile viewer to its own page is because of the weird things that can happen when iframes are involved on mobile browsers. According to bug reports I've seen, this issue seems to be a bug in iOS combined with some interactions with the FastClick and jQuery mobile libraries.

Here are a few things you can try:
In MobileReaderControl.html find the line that has -webkit-user-select: none; and change it to -webkit-user-select: auto;. In MobileReaderControl.js look for the line with FastClick.attach and comment it out. Even with these two changes I seem to still run into issues when programmatically focusing the textarea so to disable this find the showNotePopup function in MobileReaderControl.js and remove the line that has me.$noteTextarea.focus();.

With these changes it seems to be working better. You could try different combinations of these three changes but it seemed to work best with all three.

Kevin Kuo

unread,
Sep 25, 2014, 1:36:53 PM9/25/14
to pdfnet-w...@googlegroups.com
The iOS bug causing this issue seems to be fixed in iOS8.

Matt Parizeau

unread,
Oct 16, 2015, 3:39:29 PM10/16/15
to PDFTron WebViewer
For WebViewer 2.0:

The code that's doing the focusing, and should be removed, is in MobileReaderControl.js at the bottom of the editAnnotationNote function. In particular the calls to $textarea.focus() could be removed.
Reply all
Reply to author
Forward
0 new messages