Function preventBrowserHistorySwipeGestures

Prevents browser history swipe gestures.

This function adds an event listener to the touchstart event and checks if the touch event occurs at the edges of the screen. If a touch event occurs at the left or right 10% of the screen width, it prevents the default behavior which could trigger browser history swipe gestures.

  • Returns (() => void)

    The function to remove the event listener.

      • (): void
      • Returns void