<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Scroll-snap animations should not start on axes with zero-delta"
   href="https://bugs.webkit.org/show_bug.cgi?id=145148">145148</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Scroll-snap animations should not start on axes with zero-delta
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Layout and Rendering
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bfulgham&#64;webkit.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I noticed a bug in two-dimensional scroll snap regions as follows:

1. Begin a vertical scroll-snap gesture.
2. Scroll region being a vertical scroll animation.
3. Interrupt the vertical scroll with a horizontal gesture.
4. A horizontal scroll will begin.
5. Suddenly, the horizontal scroll will end and a vertical scroll will start.
6. The remainder of the original vertical scroll completes.

This is happening because of a flaw in the gesture handling code.

a. Vertical gestures are tracked, and a vertical target is selected.
b. Horizontal gesture interrupts animation, clearing the wheel tracking state.
c. Horizontal gesture is tracked, causing non-zero X delta values to be tracked, as well as an equivalent set of zero Y delta values.
d. When the horizontal gesture enters the inertial scrolling phase, WebKit activates the scroll snap logic.
e. WebKit first checks for vertical scrolling. It sees that it has a valid count of wheel events, and triggers the start of a vertical scroll snap animation.
f. The vertical scroll animation begins overriding wheel events.
g. Later, WebKit checks for horizontal scrolling. However, it sees that wheel events are being overridden, and stops.
h. Consequently, the horizontal snap is &quot;converted&quot; to a vertical snap.

The fix is to block starting the scroll snap animation on an axis if the user gesture involved zero delta in the direction of the axis.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>