MDL-45634 editor_atto: Adding type button to toolbar buttons

This prevents the browser to assume that those buttons are submit
buttons. In which case the submit action was stolen and the form
could not be submitted pressing the 'enter' key.
This commit is contained in:
Frederic Massart
2014-06-03 12:09:17 +08:00
parent 8e478c99d3
commit 097f7eca38
4 changed files with 5 additions and 5 deletions
@@ -355,7 +355,7 @@ EditorPluginButtons.prototype = {
var title = M.util.get_string(config.title, 'atto_' + pluginname);
// Create the actual button.
button = Y.Node.create('<button class="' + buttonClass + '"' +
button = Y.Node.create('<button type="button" class="' + buttonClass + '"' +
'tabindex="-1">' +
'<img class="icon" aria-hidden="true" role="presentation" width="16" height="16" src="' + config.iconurl + '"/>' +
'</button>');
File diff suppressed because one or more lines are too long
@@ -355,7 +355,7 @@ EditorPluginButtons.prototype = {
var title = M.util.get_string(config.title, 'atto_' + pluginname);
// Create the actual button.
button = Y.Node.create('<button class="' + buttonClass + '"' +
button = Y.Node.create('<button type="button" class="' + buttonClass + '"' +
'tabindex="-1">' +
'<img class="icon" aria-hidden="true" role="presentation" width="16" height="16" src="' + config.iconurl + '"/>' +
'</button>');
+1 -1
View File
@@ -206,7 +206,7 @@ EditorPluginButtons.prototype = {
var title = M.util.get_string(config.title, 'atto_' + pluginname);
// Create the actual button.
button = Y.Node.create('<button class="' + buttonClass + '"' +
button = Y.Node.create('<button type="button" class="' + buttonClass + '"' +
'tabindex="-1">' +
'<img class="icon" aria-hidden="true" role="presentation" width="16" height="16" src="' + config.iconurl + '"/>' +
'</button>');