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:
+1
-1
@@ -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>');
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -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>');
|
||||
|
||||
@@ -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>');
|
||||
|
||||
Reference in New Issue
Block a user