src/sap.ui.core/src/sap/ui/events/TouchToMouseMapping.js
function(sType, oEvent) {

			if (!bHandleEvent) {
				return;
			}

			// we need mapping of the different event types to get the correct target
			var oMappedEvent = oEvent.type == "touchend" ? oEvent.changedTouches[0] : oEvent.touches[0];

			// create the synthetic event
			var newEvent = oDocument.createEvent('MouseEvent'); // trying to create an actual TouchEvent will create an error
			newEvent.initMouseEvent(sType, true, true, window, oEvent.detail,
				oMappedEvent.screenX, oMappedEvent.screenY, oMappedEvent.clientX, oMappedEvent.clientY,
				oEvent.ctrlKey, oEvent.shiftKey, oEvent.altKey, oEvent.metaKey,
				oEvent.button, oEvent.relatedTarget);

			newEvent.isSynthetic = true;

			// Timeout needed. Do not interrupt the native event handling.
			window.setTimeout(function() {
				oTarget.dispatchEvent(newEvent);
			}, 0);
		}
function(sType, oEvent) {

			if (!bHandleEvent) {
				return;
			}

			// we need mapping of the different event types to get the correct target
			var oMappedEvent = oEvent.type == "touchend" ? oEvent.changedTouches[0] : oEvent.touches[0];

			// create the synthetic event
			var newEvent = oDocument.createEvent('MouseEvent'); // trying to create an actual TouchEvent will create an error
			newEvent.initMouseEvent(sType, true, true, window, oEvent.detail,
				oMappedEvent.screenX, oMappedEvent.screenY, oMappedEvent.clientX, oMappedEvent.clientY,
				oEvent.ctrlKey, oEvent.shiftKey, oEvent.altKey, oEvent.metaKey,
				oEvent.button, oEvent.relatedTarget);

			newEvent.isSynthetic = true;

			// Timeout needed. Do not interrupt the native event handling.
			window.setTimeout(function() {
				oTarget.dispatchEvent(newEvent);
			}, 0);
		}
function ( sType , oEvent ) { if ( ! bHandleEvent ) { return ; } // we need mapping of the different event types to get the correct target var oMappedEvent = oEvent . type == "touchend" ? oEvent . changedTouches [ 0 ] : oEvent . touches [ 0 ] ; // create the synthetic event var newEvent = oDocument . createEvent ( 'MouseEvent' ) ; // trying to create an actual TouchEvent will create an error newEvent . initMouseEvent ( sType , true , true , window , oEvent . detail , oMappedEvent . screenX , oMappedEvent . screenY , oMappedEvent . clientX , oMappedEvent . clientY , oEvent . ctrlKey , oEvent . shiftKey , oEvent . altKey , oEvent . metaKey , oEvent . button , oEvent . relatedTarget ) ; newEvent . isSynthetic = true ; // Timeout needed. Do not interrupt the native event handling. window . setTimeout ( function ( ) { oTarget . dispatchEvent ( newEvent ) ; } , 0 ) ; }
Fires a synthetic mouse event for a given type and native touch event.
@param {string} sType the type of the synthetic event to fire, e.g. "mousedown"
@param {jQuery.Event} oEvent the event object
@private
Fires a synthetic mouse event for a given type and native touch event .