Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13759

MobileWeb: Set useTouch to false when window.ontouchscreen is set to null

    Details

    • Type: Story
    • Status: Closed
    • Priority: High
    • Resolution: Won't Fix
    • Affects Version/s: Release 3.1.0
    • Fix Version/s: None
    • Component/s: MobileWeb
    • Labels:
      None

      Description

      We are seeing an issue with Denso IVI platform where for Titanium apps, the click event is not being handled on IVI browser. After investigation from the Denso team, it looks to be caused by the QtWebKit implementation of window.ontouchstart property handling.

      In QtWebKit, it set "window.ontouchscreen = null" even though it doesn't support touch event. However, in our mobile web code, we only check for the existence of ontouchscreen property and assume the browser supports touch event as long as it is set, even if it's set to null. Since QtWebKit only reports mouse event, as a result, no one responds to click events.

      The Denso team is able to work around the issue by modifying the code in files mobileweb/titanium/Ti/_/UI/Element.js and mobileweb/titanium/Ti/UI.js to add the following line after "useTouch = 'ontouchstart' in global":

      if (useTouch && global.ontouchstart == null) {
          useTouch = false;
      }
      

      This ticket is to merge the suggested change into the mobile web code.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                mxia Michael Xia
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-16406
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code