Skip to content

Commit 97154e2

Browse files
committed
Merge pull request sparksuite#345 from jbutz/development
Prevent onclick event from bubbling
2 parents b6b1f7c + 7187fb2 commit 97154e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/js/simplemde.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,8 @@ SimpleMDE.prototype.createToolbar = function(items) {
16961696
// bind events, special for info
16971697
if(item.action) {
16981698
if(typeof item.action === "function") {
1699-
el.onclick = function() {
1699+
el.onclick = function(e) {
1700+
e.preventDefault();
17001701
item.action(self);
17011702
};
17021703
} else if(typeof item.action === "string") {

0 commit comments

Comments
 (0)