Add some comments to the code

This commit is contained in:
Abijeet
2023-01-04 15:17:23 +05:30
committed by Niklas Laxström
parent 453cc37341
commit f6b1e5cc6e
2 changed files with 3 additions and 0 deletions

View File

@@ -150,6 +150,7 @@
var $selectedItem = $listItems.eq( this.navigationIndex );
$selectedItem.addClass( 'language-option--highlighted' );
// If the selected item is not visible, then scroll the container to display it
if ( !isLanguageFullyVisible( $selectedItem, this.$element ) ) {
$selectedItem.get( 0 ).scrollIntoView( false );
}