Commit c92a93967bb396f80301e13f0ca7d85b544f71b4
fix tab navigation scrolling you to top of tab
mix irving committed on 3/10/2018, 10:02:29 AMParent: 12afbe74bc5cc064c91589765740b445178cba25
Files changed
app/sync/goTo.js | changed |
app/sync/goTo.js | ||
---|---|---|
@@ -36,11 +36,15 @@ | ||
36 | 36 … | |
37 | 37 … | var page = tabs.get(locationId) |
38 | 38 … | if (page) { |
39 | 39 … | tabs.select(locationId) |
40 | - if (page && page.firstChild && page.firstChild.scrollDownToMessage) { | |
41 | - page.firstChild.scrollDownToMessage(location.key) | |
40 … | + | |
41 … | + if (location.value) { // if there's a value it's not just a hydrated locationId | |
42 … | + if (page && page.firstChild && page.firstChild.scrollDownToMessage) { | |
43 … | + page.firstChild.scrollDownToMessage(location.key) | |
44 … | + } | |
42 | 45 … | } |
46 … | + | |
43 | 47 … | api.history.sync.push(location) |
44 | 48 … | |
45 | 49 … | return true |
46 | 50 … | } |
Built with git-ssb-web