Commit 1f75098ea346db1847379704874c063c87bbe800
Prevent navigating away when clicking action links
Charles Lehner authored on 9/25/2016, 8:28:16 PMDominic Tarr committed on 10/24/2016, 8:26:19 PM
Parent: 7be27d2e405a2a962e2b8b3743cb328dca84c297
Files changed
modules/git.js | changed |
modules/git.js | |||
---|---|---|---|
@@ -184,12 +184,14 @@ | |||
184 | 184 … | h('div.git-table-wrapper', | |
185 | 185 … | h('table', | |
186 | 186 … | forksT = tableRows(h('tr', | |
187 | 187 … | h('th', 'forks'))))), | |
188 | - h('div', h('a', {href: '#', onclick: function () { | ||
188 … | + h('div', h('a', {href: '#', onclick: function (e) { | ||
189 … | + e.preventDefault() | ||
189 | 190 … | this.parentNode.replaceChild(issueForm(msg), this) | |
190 | 191 … | }}, 'New Issue…')), | |
191 | - h('div', h('a', {href: '#', onclick: function () { | ||
192 … | + h('div', h('a', {href: '#', onclick: function (e) { | ||
193 … | + e.preventDefault() | ||
192 | 194 … | this.parentNode.replaceChild(pullRequestForm(msg), this) | |
193 | 195 … | }}, 'New Pull Request…'))) | |
194 | 196 … | ||
195 | 197 … | pull(getRefs(msg), pull.drain(function (ref) { | |
@@ -437,9 +439,10 @@ | |||
437 | 439 … | exports.message_action = function (msg, sbot) { | |
438 | 440 … | var c = msg.value.content | |
439 | 441 … | if(c.type === 'issue' || c.type === 'pull-request') { | |
440 | 442 … | var isOpen | |
441 | - var a = h('a', {href: '#', onclick: function () { | ||
443 … | + var a = h('a', {href: '#', onclick: function (e) { | ||
444 … | + e.preventDefault() | ||
442 | 445 … | message_confirm({ | |
443 | 446 … | type: 'issue-edit', | |
444 | 447 … | root: msg.key, | |
445 | 448 … | issues: [{ |
Built with git-ssb-web