Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

381 B
Raw Blame
import { LiveData } from '@toeverything/infra';

export const enableNavigationGesture$ = new LiveData(false);

const onTouchStart = (e: TouchEvent) => {
  if (enableNavigationGesture$.value) return;

  const clientX = e.changedTouches[0].clientX;
  if (clientX <= 25) {
    e.preventDefault();
  }
};
document.body.addEventListener('touchstart', onTouchStart, { passive: false });