git ssb

16+

Dominic / patchbay



Commit af7e4129360b36c2646ff7a736b53c73d5709ee6

Merge pull request #236 from christianbundy/fix-scroll-error

Fix keyboard shortcut scroll error
mix irving authored on 8/22/2018, 2:52:38 AM
GitHub committed on 8/22/2018, 2:52:38 AM
Parent: 916d4ff5d00c6cf2d987b6d189c741735eb4c674
Parent: d9e268251876a3e489efb98d379e2bc3a363bab1

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