materialNote
materialNote copied to clipboard
Dropdown menus submit form
Dropdown menus in the toolbar are implemented as button
tags but have no type
property. The default value for that property is submit
which means each time one toolbar menu is opened the form containing the materialnote editor is submitted.
Please add type="button"
to the attribute list of buttons. Otherwise, the editor is not very useful when insede a form element.
I'm working with the Meteor package, inside an autoform form, but that should not be relevant.
Hi,
workaround for me (prevent every dropdown to submit)
in the Template.xxx.onRendered : // all i are buttons ... $("i").attr("type", "button").click(function(e) { e.preventDefault() });
and in Template.xxx.events :
'click .note-editor * ' : function(e) { e.preventDefault() ; return ; }
AbdelMounhim, the type attribute makes no sense in the context of i HTML elements.
What I temporarily did is:
$(".note-editor")
.find("button")
.attr("type", "button");
@diegonc Thanks, this workaround works great for the time being.
yes. thanks @diegonc for your workaround.
Same problem. Thank you @diegonc , your solution works like a charm.
Lot of thanks @diegonc !