on master help sign in
Fix result selection for top & bottom scrolling
commitc12e41a80f7b88e75f6cf5960948c784a316f724 authorKirill Isakov <ukwt@ya.ru> dateSun 24 Apr 2016, 21:18 (10 years ago) parent7b48a66
1 file changed+4−4
searx/static/plugins/js/vim_hotkeys.js+4−4
searx/static/plugins/js/vim_hotkeys.js+4−4
@@ -44,13 +44,13 @@ $(document).ready(function() {
4444 },
4545 71: {
4646 key: 'g',
47− fun: scrollPageTo(-document.body.scrollHeight),
47+ fun: scrollPageTo(-document.body.scrollHeight, 'top'),
4848 des: 'scroll to the top of the page',
4949 cat: 'Navigation'
5050 },
5151 86: {
5252 key: 'v',
53− fun: scrollPageTo(document.body.scrollHeight),
53+ fun: scrollPageTo(document.body.scrollHeight, 'bottom'),
5454 des: 'scroll to the bottom of the page',
5555 cat: 'Navigation'
5656 },
@@ -241,10 +241,10 @@ $(document).ready(function() {
241241 }
242242 }
243243
244− function scrollPageTo(position) {
244+ function scrollPageTo(position, nav) {
245245 return function() {
246246 window.scrollTo(0, position);
247− highlightResult('visible')();
247+ highlightResult(nav)();
248248 }
249249 }
250250