function navigate(oSource, aScopes, bForward) {
			if (!aScopes || aScopes.length == 0) {
				aScopes = [document];
			}

			if (!isContained(aScopes, oSource)) {
				return;
			}

			var oSouceGroup = findClosestGroup(oSource),
				$AllTabbables = filterStaticAreaContent(jQuery(aScopes).find(':sapTabbable').addBack(':sapTabbable'), aScopes),
				$FirstTabbableInScope = $AllTabbables.first(),
				$Tabbables = filterStaticAreaContent(findTabbables(oSource, aScopes, bForward), aScopes),
				oGroup, $Target;

			if (bForward) {
				//Find the first next tabbable within another group
				for (var i = 0; i < $Tabbables.length; i++) {
					oGroup = findClosestGroup($Tabbables[i]);
					if (oGroup != oSouceGroup) {
						$Target = jQuery($Tabbables[i]);
						break;
					}
				}

				//If not found, end of scope (e.g. page) is reached -> Focus the first tabbable scope (e.g. page) element
				if (!$Target || !$Target.length) {
					$Target = $FirstTabbableInScope;
				}
			} else {
				$Target = findFirstTabbableOfPreviousGroup($FirstTabbableInScope, $Tabbables, oSouceGroup, true);

				if (!$Target || !$Target.length) {
					//No other group found before -> find first element of last group in the scope (e.g. page)

					if ($AllTabbables.length == 1) {
						//Only one tabbable element -> use it
						$Target = jQuery($AllTabbables[0]);
					} else if ($AllTabbables.length > 1) {
						oSouceGroup = findClosestGroup($AllTabbables.eq(-1));
						oGroup = findClosestGroup($AllTabbables.eq(-2));
						if (oSouceGroup != oGroup) {
							//Last tabbable scope (e.g. page) element and the previous tabbable scope (e.g. page) element have different groups -> last tabbable scope (e.g. page) element is first tabbable element of its group
							$Target = $AllTabbables.eq(-1);
						} else {
							//Take last tabbable scope (e.g. page) element as reference and start search for first tabbable of the same group
							$Target = findFirstTabbableOfPreviousGroup($FirstTabbableInScope, $AllTabbables, oSouceGroup, false);
						}
					}
				}
			}

			if ($Target && $Target.length) {
				var oTarget = $Target[0],
					oEvent = null,
					oCustomGroup = findClosestCustomGroup(oTarget);

				if (oCustomGroup && oCustomGroup.id) {
					var oControl = sap.ui.getCore().byId(oCustomGroup.id);
					if (oControl) {
						oEvent = jQuery.Event("BeforeFastNavigationFocus");
						oEvent.target = oTarget;
						oEvent.source = oSource;
						oEvent.forward = bForward;
						oControl._handleEvent(oEvent);
					}
				}

				if (!oEvent || !oEvent.isDefaultPrevented()) {
					oTarget.focus();
				}
			}
		}
function navigate(oSource, aScopes, bForward) {
			if (!aScopes || aScopes.length == 0) {
				aScopes = [document];
			}

			if (!isContained(aScopes, oSource)) {
				return;
			}

			var oSouceGroup = findClosestGroup(oSource),
				$AllTabbables = filterStaticAreaContent(jQuery(aScopes).find(':sapTabbable').addBack(':sapTabbable'), aScopes),
				$FirstTabbableInScope = $AllTabbables.first(),
				$Tabbables = filterStaticAreaContent(findTabbables(oSource, aScopes, bForward), aScopes),
				oGroup, $Target;

			if (bForward) {
				//Find the first next tabbable within another group
				for (var i = 0; i < $Tabbables.length; i++) {
					oGroup = findClosestGroup($Tabbables[i]);
					if (oGroup != oSouceGroup) {
						$Target = jQuery($Tabbables[i]);
						break;
					}
				}

				//If not found, end of scope (e.g. page) is reached -> Focus the first tabbable scope (e.g. page) element
				if (!$Target || !$Target.length) {
					$Target = $FirstTabbableInScope;
				}
			} else {
				$Target = findFirstTabbableOfPreviousGroup($FirstTabbableInScope, $Tabbables, oSouceGroup, true);

				if (!$Target || !$Target.length) {
					//No other group found before -> find first element of last group in the scope (e.g. page)

					if ($AllTabbables.length == 1) {
						//Only one tabbable element -> use it
						$Target = jQuery($AllTabbables[0]);
					} else if ($AllTabbables.length > 1) {
						oSouceGroup = findClosestGroup($AllTabbables.eq(-1));
						oGroup = findClosestGroup($AllTabbables.eq(-2));
						if (oSouceGroup != oGroup) {
							//Last tabbable scope (e.g. page) element and the previous tabbable scope (e.g. page) element have different groups -> last tabbable scope (e.g. page) element is first tabbable element of its group
							$Target = $AllTabbables.eq(-1);
						} else {
							//Take last tabbable scope (e.g. page) element as reference and start search for first tabbable of the same group
							$Target = findFirstTabbableOfPreviousGroup($FirstTabbableInScope, $AllTabbables, oSouceGroup, false);
						}
					}
				}
			}

			if ($Target && $Target.length) {
				var oTarget = $Target[0],
					oEvent = null,
					oCustomGroup = findClosestCustomGroup(oTarget);

				if (oCustomGroup && oCustomGroup.id) {
					var oControl = sap.ui.getCore().byId(oCustomGroup.id);
					if (oControl) {
						oEvent = jQuery.Event("BeforeFastNavigationFocus");
						oEvent.target = oTarget;
						oEvent.source = oSource;
						oEvent.forward = bForward;
						oControl._handleEvent(oEvent);
					}
				}

				if (!oEvent || !oEvent.isDefaultPrevented()) {
					oTarget.focus();
				}
			}
		}
function navigate ( oSource , aScopes , bForward ) { if ( ! aScopes || aScopes . length == 0 ) { aScopes = [ document ] ; } if ( ! isContained ( aScopes , oSource ) ) { return ; } var oSouceGroup = findClosestGroup ( oSource ) , $AllTabbables = filterStaticAreaContent ( jQuery ( aScopes ) . find ( ':sapTabbable' ) . addBack ( ':sapTabbable' ) , aScopes ) , $FirstTabbableInScope = $AllTabbables . first ( ) , $Tabbables = filterStaticAreaContent ( findTabbables ( oSource , aScopes , bForward ) , aScopes ) , oGroup , $Target ; if ( bForward ) { //Find the first next tabbable within another group for ( var i = 0 ; i < $Tabbables . length ; i ++ ) { oGroup = findClosestGroup ( $Tabbables [ i ] ) ; if ( oGroup != oSouceGroup ) { $Target = jQuery ( $Tabbables [ i ] ) ; break ; } } //If not found, end of scope (e.g. page) is reached -> Focus the first tabbable scope (e.g. page) element if ( ! $Target || ! $Target . length ) { $Target = $FirstTabbableInScope ; } } else { $Target = findFirstTabbableOfPreviousGroup ( $FirstTabbableInScope , $Tabbables , oSouceGroup , true ) ; if ( ! $Target || ! $Target . length ) { //No other group found before -> find first element of last group in the scope (e.g. page) if ( $AllTabbables . length == 1 ) { //Only one tabbable element -> use it $Target = jQuery ( $AllTabbables [ 0 ] ) ; } else if ( $AllTabbables . length > 1 ) { oSouceGroup = findClosestGroup ( $AllTabbables . eq ( - 1 ) ) ; oGroup = findClosestGroup ( $AllTabbables . eq ( - 2 ) ) ; if ( oSouceGroup != oGroup ) { //Last tabbable scope (e.g. page) element and the previous tabbable scope (e.g. page) element have different groups -> last tabbable scope (e.g. page) element is first tabbable element of its group $Target = $AllTabbables . eq ( - 1 ) ; } else { //Take last tabbable scope (e.g. page) element as reference and start search for first tabbable of the same group $Target = findFirstTabbableOfPreviousGroup ( $FirstTabbableInScope , $AllTabbables , oSouceGroup , false ) ; } } } } if ( $Target && $Target . length ) { var oTarget = $Target [ 0 ] , oEvent = null , oCustomGroup = findClosestCustomGroup ( oTarget ) ; if ( oCustomGroup && oCustomGroup . id ) { var oControl = sap . ui . getCore ( ) . byId ( oCustomGroup . id ) ; if ( oControl ) { oEvent = jQuery . Event ( "BeforeFastNavigationFocus" ) ; oEvent . target = oTarget ; oEvent . source = oSource ; oEvent . forward = bForward ; oControl . _handleEvent ( oEvent ) ; } } if ( ! oEvent || ! oEvent . isDefaultPrevented ( ) ) { oTarget . focus ( ) ; } } }
Finds the next/previous (bForward) element in the F6 chain starting from the given source element within the given scopes and focus it
Finds the next / previous ( bForward ) element in the F6 chain starting from the given source element within the given scopes and focus it
Navigates to the given tabbable element.