mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-07-02 23:54:28 -06:00
Prevent onclick event from bubbling
This commit is contained in:
parent
b6b1f7c1ef
commit
f21cca3068
@ -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…
x
Reference in New Issue
Block a user