Skip to content

Commit

Permalink
Let up and down arrow just scroll text, instead of jumping to code block
Browse files Browse the repository at this point in the history
  • Loading branch information
monopole committed Nov 19, 2024
1 parent ee413ff commit 2780a2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/web/app/widget/helpbox/helpbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>Keys</h3>
</tr>
<tr>
<td class='desc'> activate (previous, next) code block</td>
<td class='keys'> &darr; &uarr; &nbsp; w s &nbsp; j k</td>
<td class='keys'> w s &nbsp; j k</td>
</tr>
<tr>
<td class='desc'> scroll to active code block</td>
Expand Down
4 changes: 2 additions & 2 deletions internal/web/app/widget/mdfiles/mdfiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ class MdFilesController {
me.runActiveCodeBlock();
me.appState.goNextCodeBlock();
break;
// case 'ArrowUp': Leave this to merely scroll text.
case 'w':
case 'k':
case 'ArrowUp':
event.preventDefault();
me.appState.goPrevCodeBlock();
break;
// case 'ArrowDown': Leave this to merely scroll text.
case 'j':
case 's':
case 'ArrowDown':
event.preventDefault();
me.appState.goNextCodeBlock();
break;
Expand Down

0 comments on commit 2780a2a

Please sign in to comment.