Commit e55f2b6f8739b7b56427b8bbdab3f5e3802ec8b0
fix bug where compose was only rendering on first screen
Ev Bogue committed on 5/25/2018, 9:08:50 PMParent: 11ede85b7634bfac97e4ee875592d5f8610f4433
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -15,13 +15,13 @@ | ||
15 | 15 | h('li', h('a', {href: '#' + id}, h('span.avatar--small', avatar.image(id)))), |
16 | 16 | h('li', h('a', {href: '#' + id}, avatar.name(id))), |
17 | 17 | h('li', h('a', 'Compose', { |
18 | 18 | onclick: function () { |
19 | - document.getElementById('screen') | |
19 | + var currentScreen = document.getElementById('screen') | |
20 | 20 | var opts = {} |
21 | 21 | opts.type = 'post' |
22 | 22 | var composer = h('div.content#composer', h('div.message', compose(opts))) |
23 | - screen.firstChild.insertBefore(composer, screen.firstChild.firstChild) | |
23 | + currentScreen.firstChild.insertBefore(composer, currentScreen.firstChild.firstChild) | |
24 | 24 | } |
25 | 25 | })), |
26 | 26 | h('li', h('a', {href: '#'}, 'Public')), |
27 | 27 | h('li', h('a', {href: '#private' }, 'Private')), |
Built with git-ssb-web