File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1381,15 +1381,15 @@ function sepiaFW_build_ui_cards(){
13811381 //avoid that the menu is hidden behind control when at bottom of results view
13821382 if ( $contextMenu . is ( ":last-child" ) ) {
13831383 var $container = $contextMenu . closest ( '.sepiaFW-cards-flexSize-container' ) ;
1384- if ( $ container. is ( ":last-child" ) ) {
1385- if ( $container . parent ( ) . hasClass ( '.sepiaFW-results-container' ) || $container . parent ( ) . is ( ":last-child" ) ) {
1386- //scroll down another 60px
1387- setTimeout ( function ( ) {
1388- var $scrollContainer = $container . closest ( '.sepiaFW-results-container' ) ;
1389- var y = $scrollContainer . scrollTop ( ) ;
1390- $scrollContainer . animate ( { scrollTop : y + 60 } , animTime ) ;
1391- } , animTime + 50 ) ;
1392- }
1384+ var $lastVisibleChildInScrollParent = $ container. closest ( '.sepiaFW-results-container' ) . children ( ) . filter ( ":visible" ) . last ( ) ;
1385+ var $lastVisibleParentChild = $container . parent ( ) . children ( ) . filter ( ":visible" ) . last ( ) ;
1386+ if ( ( $container . is ( $lastVisibleParentChild ) && $container . parent ( ) . is ( $lastVisibleChildInScrollParent ) ) || $container . is ( $lastVisibleChildInScrollParent ) ) {
1387+ //scroll down another 60px
1388+ setTimeout ( function ( ) {
1389+ var $scrollContainer = $container . closest ( '.sepiaFW-results-container' ) ;
1390+ var y = $scrollContainer . scrollTop ( ) ;
1391+ $scrollContainer . animate ( { scrollTop : y + 60 } , animTime ) ;
1392+ } , animTime + 50 ) ;
13931393 }
13941394 }
13951395 } else {
You can’t perform that action at this time.
0 commit comments