Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2930] iOS / iPad: webView Touch Events remove all other touch events outside of WebView

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-05T21:03:57.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsios, quickstart-customer, reported-1.6.0, rplist
ReporterRick Blalock
AssigneeIngo Muschenetz
Created2011-04-15T03:33:12.000+0000
Updated2017-06-05T21:03:57.000+0000

Description

This issue was reported by a quickstart customer today. Here is a screenshot of the app: https://img.skitch.com/20110125-pkj4x748henwwpyek5br76d5wi.jpg">https://img.skitch.com/20110125-pkj4x748henwwpyek5br76d5wi.jpg - The webView is meant for capturing signatures. The webView successfully receives touch events but the tableview below it along with the textfields and any other elements do not receive any touch events. If the webView is removed then the tableView and any other native elements receive touch events.

Worked previously in 1.4.2. Does not work in 1.5.1 and 1.6 (build from today, 1-25-2011).

Sample code below. The tableview and children are added after the webView code. Also, even setting the webView to touchEnabled: false doesn't work:

...

    Approve.webView = Titanium.UI.createWebView
    ({
            top: 24,
            width: "640",
            height: "320",
            url:'windows/activity/approve.html',
            backgroundColor: Styling.Colors.Transparent,
            zIndex: '3',
            borderRadius:16,
            borderColor:'#ffffff',
            borderWidth:2
    });
    mainView.add(Approve.webView);

    Approve.Clear();
    
    Approve.thiswindow.add(mainView);

    /// Triggers when the finger starts touching the screen
    Approve.webView.addEventListener('touchstart', function (e)
    {
        if(Approve.Activity.readonly == false)
        {
            if(Approve.VML.length > 1990)
            {
                return;
            };
    
            Approve.VML += (Approve.START + e.x + ',' + e.y + ' ');
    
            Approve.lastX = e.x;
            Approve.lastY = e.y;
    
            Approve.webView.evalJS('touchstartx(' + e.x + ',' + e.y + ')');
        }
    });

    /// Triggers when the finger moves over the screensurface
    Approve.webView.addEventListener('touchmove', function (e) 
    {
        if(Approve.Activity.readonly == false)
        {
            // Max length for signature in the database is 2000 characters
            if(Approve.VML.length > 1990)
            {
                return;
            };

            // Do not store duplicate coordinates back to back
            if(e.x == Approve.lastX && e.y == Approve.lastY)
            {
                return;
            };
    
            // Append the current coordinates to the VML string
            Approve.VML += e.x + ',' + e.y + ' ';
    
            // Remember the current coordinates as the last used coordinates
            Approve.lastX = e.x;
            Approve.lastY = e.y;
    
            // Have the webpage draw the actual line on the canvas
            Approve.webView.evalJS('touchmovex(' + e.x + ',' + e.y + ')');
    
            Approve.webView.evalJS('progress(' + Approve.VML.length + ');');
        };
    });

    /// Triggers when the finger is released from the screen
    Approve.webView.addEventListener('touchend', function (e) 
    {
        if(Approve.Activity.readonly == false)
        {
            if(!Approve.VML.endsWith('>'))
            {
                Approve.VML += Approve.END;
            };
        };
    });

...

Comments

  1. Lee Morris 2017-06-05

    Closing ticket due to the time passed and lack of progress over the past few years.

JSON Source