The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/polyfills/hoverTouchClick.ts

17 lines
397 B

import * as domEvents from '../lib/utils/domEvents';
import { isIOsDevice } from '../lib/utils/isIOsDevice';
((): void => {
if (!isIOsDevice || !window.matchMedia('(hover: none)').matches) {
return;
}
domEvents.delegate({
parent: document.body,
eventName: 'touchend',
elementSelector: 'a:hover',
listener: (_, element): void => {
domEvents.triggerClick(element);
},
});
})();