git ssb

16+

Dominic / patchbay



Commit d9e268251876a3e489efb98d379e2bc3a363bab1

Fix keyboard shortcut scroll error

Christian Bundy committed on 8/14/2018, 7:12:52 PM
Parent: ca8ac8d21e58b7d37981f6ee097ce54b1bf10b22

Files changed

app/sync/catch-keyboard-shortcut.jschanged
app/sync/catch-keyboard-shortcut.jsView
@@ -43,11 +43,17 @@
4343 }
4444 }
4545
4646 function genericShortcuts (ev, { tabs, search, goTo, back }) {
47- const scroll = tabs.currentPage().scroll || noop
47 + let scroll
48 + const currentPage = tabs.currentPage()
4849 // TODO change this scroll API - it seems some pages
49- // (e.g. Dark Crystal Index has scroll defined and expect an object...)
50 + // (e.g. Dark Crystal Index) has scroll defined and expect an object
51 + if (currentPage) {
52 + scroll = currentPage.scroll
53 + } else {
54 + scroll = noop
55 + }
5056
5157 // Messages
5258 if (ev.keyCode === 71) { // gg = scroll to top
5359 if (!gPressed) {

Built with git-ssb-web