Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14926 closed bug (duplicate)

ui.mouse support for touch events

Reported by: gvanmat Owned by:
Priority: minor Milestone: none
Component: ui.mouse Version: 1.12.0-beta.1
Keywords: Cc:
Blocked by: Blocking:


The ui.mouse headless component is used by a number of other component features (draggable.js, sortable.js, resizable.js). This component only distributes mouse events. This falls short when used in a hybrid app.

The proposal is to utilize touch events when the browser supports them instead of mouse events. To minimize change, the touch events are normalized as native mouse events. The last touch point is pulled up to a corresponding simulated mouse event. The native simulated event is wrapped in a jquery event object. The simulated mouse events are passed to the placeholder methods but the native event is not dispatched.

Consider the following mapping: {'touchstart': 'mousedown', 'touchmove': 'mousemove', 'touchend': 'mouseup'}

Change History (4)

comment:1 Changed 3 years ago by gvanmat

Created pull request with the proposed fix:

comment:2 Changed 3 years ago by gvanmat

Closed the last pull as it didn't pass lint or qunit tests. Please consider the following pull request:

comment:3 Changed 3 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #4143.

comment:4 Changed 3 years ago by gvanmat

I used the following duck punch workaround:

NOTE: Code removed from comment. Use for now.

Last edited 3 years ago by Scott González (previous) (diff)
Note: See TracTickets for help on using tickets.