git ssb

16+

Dominic / patchbay



Commit 1030b0d12b0cd09f230e0fbaceb7eaf441cb3757

fix error addition ... mostly

mix irving committed on 2/2/2017, 1:40:04 PM
Parent: e757955e84bfb9e170ad69e986a9042e6a83851b

Files changed

keyscroll.jschanged
modules_core/app.jschanged
modules_core/app.mcsschanged
modules_core/tabs.jschanged
keyscroll.jsView
@@ -23,10 +23,9 @@
2323 curMsgEl = el
2424 }
2525
2626 return function scroll(d) {
27- selectChild(!curMsgEl ? container.firstChild
28- : d === 'first' ? container.firstChild
27 + selectChild((!curMsgEl || d == 'first') ? container.firstChild
2928 : d < 0 ? curMsgEl.previousElementSibling || container.firstChild
3029 : d > 0 ? curMsgEl.nextElementSibling || container.lastChild
3130 : curMsgEl)
3231 }
modules_core/app.jsView
@@ -39,18 +39,20 @@
3939 }
4040 }
4141
4242 function displayError (e) {
43- document.body.appendChild(
44- h('Error', [
45- h('h1', e.message),
46- h('big', [
47- h('code', e.filename + ':' + e.lineno)
48- ]),
49- h('pre', e.error
50- ? (e.error.stack || e.error.toString())
51- : e.toString()
52- )
43 + document.body.querySelector('.\\.content').appendChild(
44 + h('div.page', [
45 + h('Error', { title: e.message }, [
46 + h('h1', e.message),
47 + h('big', [
48 + h('code', e.filename + ':' + e.lineno)
49 + ]),
50 + h('pre', e.error
51 + ? (e.error.stack || e.error.toString())
52 + : e.toString()
53 + )
54 + ])
5355 ])
5456 )
5557 }
5658
modules_core/app.mcssView
@@ -11,16 +11,19 @@
1111 }
1212
1313
1414 Error {
15- background: #ff5555
15 + padding: 1rem
1616
1717 h1 {
18 + color: red
1819 }
1920
2021 big {
2122 }
2223
2324 pre {
25 + padding: 1rem
26 + border: 1px gainsboro solid
2427 }
2528 }
2629
modules_core/tabs.jsView
@@ -117,9 +117,8 @@
117117
118118 // scroll to top
119119 if (ev.keyCode == 71) { // g
120120 if (!gPressed) return gPressed = true
121-
122121 var el = tabs.get(tabs.selected[0]).firstChild.scroll('first')
123122 gPressed = false
124123 } else {
125124 gPressed = false

Built with git-ssb-web