When click the input box on your mobile browser, click and touchend event occur concurrently
jung-han opened this issue · 0 comments
jung-han commented
Version
Development Environment
Current Behavior
// setTouchClickEvent.js
module.exports = function(target, handler, option) {
var $target = $(target);
var eventList = ['mouseup', 'touchend'];
var selector, namespace, events;
option = option || {};
selector = option.selector || null;
namespace = option.namespace || '';
if (namespace) {
eventList = snippet.map(eventList, function(eventName) {
return eventName + '.' + namespace;
});
}
events = eventList.join(' ');
$target.on(events, selector, function onceHandler(ev) {
var newEventName = ev.type + '.' + namespace;
handler(ev);
$target.off(events, selector, onceHandler)
.on(newEventName, selector, handler);
});
};
When click the input box on your mobile browser, click and touchend event occur concurrently