@@ -1023,12 +1023,14 @@ export class BlockDragStrategy implements IDragStrategy {
10231023 if ( forwardTraversal ) {
10241024 if ( currentPairIndex === - 1 ) {
10251025 const terminal = this . isInTerminalPosition ( this . block , Direction . DOWN ) ;
1026- if ( navigator . getNavigationLoops ( ) ) {
1027- return this . pairToCandidate ( pairs [ 0 ] ) ;
1028- } else if ( ! terminal ) {
1029- return this . getClosestCandidate ( this . block , delta ) ;
1026+ if ( terminal ) {
1027+ if ( navigator . getNavigationLoops ( ) ) {
1028+ return this . pairToCandidate ( pairs [ 0 ] ) ;
1029+ } else {
1030+ return null ;
1031+ }
10301032 }
1031- return null ;
1033+ return this . getClosestCandidate ( this . block , delta ) ;
10321034 } else if ( currentPairIndex === pairs . length - 1 ) {
10331035 return null ;
10341036 } else {
@@ -1037,12 +1039,14 @@ export class BlockDragStrategy implements IDragStrategy {
10371039 } else {
10381040 if ( currentPairIndex === - 1 ) {
10391041 const terminal = this . isInTerminalPosition ( this . block , Direction . UP ) ;
1040- if ( navigator . getNavigationLoops ( ) ) {
1041- return this . pairToCandidate ( pairs [ pairs . length - 1 ] ) ;
1042- } else if ( ! terminal ) {
1043- return this . getClosestCandidate ( this . block , delta ) ;
1042+ if ( terminal ) {
1043+ if ( navigator . getNavigationLoops ( ) ) {
1044+ return this . pairToCandidate ( pairs [ pairs . length - 1 ] ) ;
1045+ } else {
1046+ return null ;
1047+ }
10441048 }
1045- return null ;
1049+ return this . getClosestCandidate ( this . block , delta ) ;
10461050 } else if ( currentPairIndex === 0 ) {
10471051 return null ;
10481052 } else {
0 commit comments