redirectOnTouchStartToMouseEvent function
Redirects element.onTouchStart
to element.onMouseDown
as MouseEvent.
Implementation
void redirectOnTouchStartToMouseEvent(Element element) {
element.onTouchStart.listen((event) {
var mouseEvent = touchEventToMouseEvent(event);
if (mouseEvent != null) {
element.dispatchEvent(mouseEvent);
}
});
}