Ensured side menu is not swippoed when horizontally scrolling visits table

This commit is contained in:
Alejandro Celaya 2020-04-28 18:54:58 +02:00
parent 54fec79945
commit e38887aa26

View file

@ -31,8 +31,12 @@ const MenuLayout = (TagsList, ShortUrls, AsideMenu, CreateShortUrl, ShortUrlVisi
const burgerClasses = classNames('menu-layout__burger-icon', {
'menu-layout__burger-icon--active': sidebarVisible,
});
const swipeMenuIfNoModalExists = (callback) => () => {
if (document.querySelector('.modal')) {
const swipeMenuIfNoModalExists = (callback) => (e) => {
const swippedOnVisitsTable = e.event.path.some(
({ classList }) => classList && classList.contains('visits-table')
);
if (swippedOnVisitsTable || document.querySelector('.modal')) {
return;
}