Commit 1157ab3d authored by webchick's avatar webchick
Browse files

#607240 by brianV: Fixed allow AJAX behaviours to be triggered with spacebar.

parent d98f29f7
......@@ -192,8 +192,8 @@ Drupal.ajax = function (base, element, element_settings) {
// action.
if (element_settings.keypress) {
$(element_settings.element).keypress(function (event) {
// Detect enter key.
if (event.keyCode == 13) {
// Detect enter key and space bar.
if (event.which == 13 || event.which == 32) {
$(element_settings.element).trigger(element_settings.event);
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment