mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
21 lines
512 B
JavaScript
21 lines
512 B
JavaScript
(function ($) {
|
|
|
|
$.entwine('ss', function ($) {
|
|
|
|
/**
|
|
* Prevent the CMS hijacking the return key
|
|
*/
|
|
$('.add-existing-autocompleter input.text').entwine({
|
|
'onkeydown': function (e) {
|
|
if(e.which == 13) {
|
|
$parent = $(this).parents('.add-existing-autocompleter');
|
|
$parent.find('button[type="submit"]').click();
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
})(jQuery);
|