Uploaded image for project: 'Apache Ripple'
  1. Apache Ripple
  2. RIPPLE-15

Touch Events emulation: emulated 'touchend' event has touch in 'touches' field

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Environment:
      Window 8 64bit;
      Chrome 26.0.1410.64 m;
      Ripple Emulator (Beta) 0.9.15

      Description

      The 'touchend' event emulated by 'mouseup' should contain empty 'touches' and 'targetTouches' lists, but actually it has one touch.
      For example, Chrome mode "Emulate touch events" works as expected - 'touchend' event have no any touch in 'touches' and 'targetTouches'. Mobile devices so work also.

      Potential issue is in this part of the code, as I think: incubator-ripple-HEAD-24cae31\lib\client\touchEventEmulator.js

      function _simulateTouchEvent(type, mouseevent) {
      ...
      changedTouches: [touchObj],
      targetTouches: [touchObj],
      touches: [touchObj]
      ...
      }

      As one of the potential solutions, I suggest to check for 'touchend' event type, something like this:
      ...

      targetTouches: type === "touchend" ? [] : [touchObj],
      touches: type === "touchend" ? [] : [touchObj]

      ....

        Attachments

          Activity

            People

            • Assignee:
              dansilivestru Dan Silivestru
              Reporter:
              san4es Alexander Ziborov
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified