File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 188188 // page up: jump five items up, stopping at the top
189189 // the number 5 is used so that we go one page in the
190190 // inner-scrolled Dependencies and Versions fields
191- switchTo = currentLink ;
192- for ( var n = 0 ; n < 5 && switchTo ; ++ n ) {
193- switchTo = previous ( allItems , switchTo ) ;
194- }
195- if ( ! switchTo ) {
196- switchTo = allItems [ 0 ] ;
191+ switchTo = currentItem || allItems [ 0 ] ;
192+ for ( var n = 0 ; n < 5 ; ++ n ) {
193+ if ( switchTo . previousElementSibling && switchTo . previousElementSibling . className == 'pure-menu-item' ) {
194+ switchTo = switchTo . previousElementSibling ;
195+ }
197196 }
198197 break ;
199198 case "pagedown" :
200199 // page down: jump five items down, stopping at the bottom
201200 // the number 5 is used so that we go one page in the
202- // inner-scrolled Depedencies and Versions fields
203- switchTo = currentLink ;
204- for ( var n = 0 ; n < 5 && switchTo ; ++ n ) {
205- switchTo = next ( allItems , switchTo ) ;
206- }
207- if ( ! switchTo ) {
208- switchTo = last ( allItems ) ;
201+ // inner-scrolled Dependencies and Versions fields
202+ switchTo = currentItem || last ( allItems ) ;
203+ for ( var n = 0 ; n < 5 ; ++ n ) {
204+ if ( switchTo . nextElementSibling && switchTo . nextElementSibling . className == 'pure-menu-item' ) {
205+ switchTo = switchTo . nextElementSibling ;
206+ }
209207 }
210208 break ;
211209 }
You can’t perform that action at this time.
0 commit comments