Add hidden input to prevent edit form submit on enter

closes #349
This commit is contained in:
Nick O'Leary
2014-08-27 21:47:17 +01:00
parent 2d92b44f52
commit 2dac28a421
2 changed files with 83 additions and 85 deletions

View File

@@ -455,7 +455,7 @@ RED.editor = (function() {
function showEditDialog(node) {
editing_node = node;
RED.view.state(RED.state.EDITING);
$("#dialog-form").html($("script[data-template-name='"+node.type+"']").html());
$("#dialog-form").html($("script[data-template-name='"+node.type+"']").html()+'<input type="text" style="display: none;" />');
prepareEditDialog(node,node._def,"node-input");
$( "#dialog" ).dialog("option","title","Edit "+node.type+" node").dialog( "open" );
}