@@ -485,8 +485,7 @@ AbstractStage {
488− switch (phase) {
488+ if (phase === 0) {
490 // the "spreadEnabled" part is because when code does "phase = 0; contentX = -shift" to
489 // the "spreadEnabled" part is because when code does "phase = 0; contentX = -shift" to
491 // dismiss the spread because spreadEnabled went to false, for some reason, during tests,
490 // dismiss the spread because spreadEnabled went to false, for some reason, during tests,
492 // Flickable might jump in and change contentX value back, causing the code below to do
491 // Flickable might jump in and change contentX value back, causing the code below to do
@@ -496,14 +495,17 @@ AbstractStage {
496 if (root.spreadEnabled && shiftedContentX > width * positionMarker2) {
495 if (root.spreadEnabled && shiftedContentX > width * positionMarker2) {
497 phase = 1;
496 phase = 1;
500+ // Do not turn to else if
501+ // Sometimes the animation of shiftedContentX is very fast and we need to jump from phase 0 to 1 to 2
502+ // in the same onShiftedContentXChanged
501 if (shiftedContentX < width * positionMarker2) {
504 if (shiftedContentX < width * positionMarker2) {
502 phase = 0;
505 phase = 0;
503 } else if (shiftedContentX >= width * positionMarker4 && !spreadDragArea.dragging) {
506 } else if (shiftedContentX >= width * positionMarker4 && !spreadDragArea.dragging) {
504 phase = 2;
507 phase = 2;