mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-05-04 15:03:20 +02:00
Merge pull request #345 from jbutz/development
Prevent onclick event from bubbling
This commit is contained in:
commit
97154e2bfc
|
@ -1696,7 +1696,8 @@ SimpleMDE.prototype.createToolbar = function(items) {
|
|||
// bind events, special for info
|
||||
if(item.action) {
|
||||
if(typeof item.action === "function") {
|
||||
el.onclick = function() {
|
||||
el.onclick = function(e) {
|
||||
e.preventDefault();
|
||||
item.action(self);
|
||||
};
|
||||
} else if(typeof item.action === "string") {
|
||||
|
|
Loading…
Reference in a new issue