Merge pull request #345 from jbutz/development

Prevent onclick event from bubbling
This commit is contained in:
Wes Cossick 2016-06-07 21:07:01 -05:00
commit 97154e2bfc

View file

@ -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") {