git ssb

16+

Dominic / patchbay



Commit 1f75098ea346db1847379704874c063c87bbe800

Prevent navigating away when clicking action links

Charles Lehner authored on 9/25/2016, 8:28:16 PM
Dominic Tarr committed on 10/24/2016, 8:26:19 PM
Parent: 7be27d2e405a2a962e2b8b3743cb328dca84c297

Files changed

modules/git.jschanged
modules/git.jsView
@@ -184,12 +184,14 @@
184184 h('div.git-table-wrapper',
185185 h('table',
186186 forksT = tableRows(h('tr',
187187 h('th', 'forks'))))),
188- h('div', h('a', {href: '#', onclick: function () {
188 + h('div', h('a', {href: '#', onclick: function (e) {
189 + e.preventDefault()
189190 this.parentNode.replaceChild(issueForm(msg), this)
190191 }}, 'New Issue…')),
191- h('div', h('a', {href: '#', onclick: function () {
192 + h('div', h('a', {href: '#', onclick: function (e) {
193 + e.preventDefault()
192194 this.parentNode.replaceChild(pullRequestForm(msg), this)
193195 }}, 'New Pull Request…')))
194196
195197 pull(getRefs(msg), pull.drain(function (ref) {
@@ -437,9 +439,10 @@
437439 exports.message_action = function (msg, sbot) {
438440 var c = msg.value.content
439441 if(c.type === 'issue' || c.type === 'pull-request') {
440442 var isOpen
441- var a = h('a', {href: '#', onclick: function () {
443 + var a = h('a', {href: '#', onclick: function (e) {
444 + e.preventDefault()
442445 message_confirm({
443446 type: 'issue-edit',
444447 root: msg.key,
445448 issues: [{

Built with git-ssb-web