#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: |
Description
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 7 years ago by
comment:2 Changed 7 years ago by
Closed the last pull as it didn't pass lint or qunit tests. Please consider the following pull request: https://github.com/gvanmat/jquery-ui/pull/2
comment:4 Changed 7 years ago by
I used the following duck punch workaround:
NOTE: Code removed from comment. Use http://touchpunch.furf.com/ for now.
Created pull request with the proposed fix: https://github.com/gvanmat/jquery-ui/pull/1