Prevent onclick event from bubbling

patch-ionaru
Jason Butz 8 years ago
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…
Cancel
Save