git ssb

16+

Dominic / patchbay



Commit 735a21fa879fddd250e0fe6224dbb269061f32d6

Fix error opening message with keyboard

cel committed on 1/11/2017, 9:46:31 PM
Parent: abc981ed003091aaeb68aab6d203e6356ea262a8

Files changed

modules_basic/message.jschanged
modules_basic/message.jsView
@@ -33,9 +33,9 @@
3333
3434 content = api.message_content(msg)
3535 if (!content) return mini(msg, message_content_mini_fallback(msg))
3636
37- return h('Message', {
37 + var msgEl = h('Message', {
3838 'ev-keydown': navigateToMessageOnEnter,
3939 attributes: {
4040 tabindex: '0'
4141 }
@@ -46,8 +46,9 @@
4646 h('section.content', content),
4747 h('section.action', api.message_action(msg)),
4848 h('footer.backlinks', api.message_backlinks(msg))
4949 ])
50 + return msgEl
5051
5152 function navigateToMessageOnEnter (ev) {
5253 // on enter, hit first meta.
5354 if(ev.keyCode == 13) {
@@ -62,8 +63,9 @@
6263 // sooooooo yeah this shit for now :)
6364 var wtf = h('a', { href: `#${msg.key}` })
6465 msgEl.appendChild(wtf)
6566 wtf.click()
67 + msgEl.removeChild(wtf)
6668 }
6769 }
6870 }
6971

Built with git-ssb-web