diff --git a/Resources/Public/Javascript/Search/SearchInDocument.js b/Resources/Public/Javascript/Search/SearchInDocument.js index 3f4c3251a8..4f2858af6f 100644 --- a/Resources/Public/Javascript/Search/SearchInDocument.js +++ b/Resources/Public/Javascript/Search/SearchInDocument.js @@ -258,3 +258,12 @@ function clearSearch() { $('.results-active-indicator').remove(); $('#tx-dlf-search-in-document-query').val(''); } + +$(document).ready(function() { + document.getElementById('tx-dlf-search-in-document-query').addEventListener("keydown", function (e) { + if (e.key === 'Enter') { + e.preventDefault(); + search(); + } + }); +});