Scroll event is called only for every second swipe when wantsScrollEventsForSwipeTracking(on:) is enabled

In my project I have text view filling up the whole window and with a swipe left or right I want to slide a sidebar in or out. I implemented wantsScrollEventsForSwipeTracking(on:) and scrollWheel(with:) in the main ViewController, but I am observing some weird behaviour: when I swipe once scrollWheel(with:) is called repeatedly until the swipe momentum has finished, but if I swipe again, either while there is still momentum or even if it has already finished, that method is not called (regardless whether I swipe left or right). Swiping a third time works again. This is a real problem because this would always require two swipes after the first one.

Here are a sample project and the steps to reproduce the issue: https://www.icloud.com/iclouddrive/0ISqzjoxbpvvF3_Wv1ji8sR_w#problem3
  1. Run the attached project.

  2. Inside the text view, swipe left. The console will print some scroll event details.

  3. When the scroll momentum has finished (nothing is printed anymore in the console), swipe left again. Now nothing will be printed out in the console.

  4. If you repeat once more, it will work again. Now you can repeat step 3 with a swipe to the right instead of left, the same thing will happen.

  5. You can also try without waiting until the scroll momentum has finished. If you swipe again while the console is still printing the momentum events (left or right doesn't matter), the momentum will be immediately stopped, but the new swipe is also not forwarded.

Scroll event is called only for every second swipe when wantsScrollEventsForSwipeTracking(on:) is enabled
 
 
Q