Inconsistencies in focusing on text area for pdf forms

71 views
Skip to first unread message

Roshan Jossey

unread,
Jul 4, 2016, 12:44:41 PM7/4/16
to PDFTron WebViewer
I'm using pdfTron to create interactive forms in cordova application.


When I tap on text area to edit it, sometimes nothing happens. It does work at other times( text area gets focused and cursor appears there).

He're how you can reproduce the issue

Go to http://pdftron.s3.amazonaws.com/downloads/PDFNetJSLean.zip

Download the sample

Upload it to pdfTron app

Tap on any text area

Observation:

text area doesn't get focused

Matt Parizeau

unread,
Jul 5, 2016, 12:50:09 PM7/5/16
to PDFTron WebViewer
Hi Roshan,

This may be related to the issue discussed here https://groups.google.com/forum/#!msg/pdfnet-webviewer/TB4dIxjA94o/yepLCHAo75gJ. The summary is that the issue may be fixed in the WKWebView so you try having Cordova use that and see if the issue persists.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Vinoth Kumar

unread,
Jul 15, 2016, 1:00:28 PM7/15/16
to PDFTron WebViewer
Hi Matt,

Thanks for the reply. We have some problem in using the WKWebView because we are loading the XOD from local file system.

Is there any alternative available to make it work without using the WKWebView?

We also tried setting the focus to the window before focusing the element but when we type the value, the values are not visible. 

It will be very helpful if you provide an alternate solution.

Thanks,
Vinoth

Vinoth Kumar

unread,
Jul 15, 2016, 1:00:28 PM7/15/16
to PDFTron WebViewer
Hi Matt,

I solved the problem by removing FastClick in iOS. I referred here.

if (!window.opera && !me.androidBrowser && !exports.utils.ieWebView && !uiWebView && !isIOS) {
            // library used to fix slow buttons on mobile devices
            // only attach to certain elements because of issues with widgets on the dialogs
            var togGroup = document.getElementsByClassName('useFastClick');
            for (var i = 0; i < togGroup.length; i++) {
                FastClick.attach(togGroup[i]);
            }

        }

Removing the FastClick is fine or do you see any problem?

Regards,
Vinoth

Matt Parizeau

unread,
Jul 15, 2016, 2:36:37 PM7/15/16
to PDFTron WebViewer
Hi Vinoth,

Removing fastclick should be fine. The only difference should be that there will be a slight delay with button clicks (http://developer.telerik.com/featured/300-ms-click-delay-ios-8/).

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Vinoth Kumar

unread,
Jul 18, 2016, 12:51:59 PM7/18/16
to PDFTron WebViewer
Hi Matt,

Thanks for the information. When we start using WKWebView we will use FastClick.

Regards,
Vinoth
Reply all
Reply to author
Forward
0 new messages