소스 검색

Fix result selection for top & bottom scrolling

Kirill Isakov 9 년 전
부모
커밋
c12e41a80f
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4
    4
      searx/static/plugins/js/vim_hotkeys.js

+ 4
- 4
searx/static/plugins/js/vim_hotkeys.js 파일 보기

@@ -44,13 +44,13 @@ $(document).ready(function() {
44 44
         },
45 45
         71: {
46 46
             key: 'g',
47
-            fun: scrollPageTo(-document.body.scrollHeight),
47
+            fun: scrollPageTo(-document.body.scrollHeight, 'top'),
48 48
             des: 'scroll to the top of the page',
49 49
             cat: 'Navigation'
50 50
         },
51 51
         86: {
52 52
             key: 'v',
53
-            fun: scrollPageTo(document.body.scrollHeight),
53
+            fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
54 54
             des: 'scroll to the bottom of the page',
55 55
             cat: 'Navigation'
56 56
         },
@@ -241,10 +241,10 @@ $(document).ready(function() {
241 241
         }
242 242
     }
243 243
 
244
-    function scrollPageTo(position) {
244
+    function scrollPageTo(position, nav) {
245 245
         return function() {
246 246
             window.scrollTo(0, position);
247
-            highlightResult('visible')();
247
+            highlightResult(nav)();
248 248
         }
249 249
     }
250 250