Skip to content

TagSpaces is an offline, open source, document manager with tagging support

adding starting the search on enter

uggrockc4fcf8daf561
diff --git a/data/js/search.ui.js b/data/js/search.ui.js
index 139e35ec6..55f73d1bd 100644
--- a/data/js/search.ui.js
+++ b/data/js/search.ui.js
@@ -72,11 +72,11 @@ define(function(require, exports, module) {
$('#searchTerms').on('blur', function(e) {
updateQuery();
- });
+ }).keypress(startSearchOnEnter);
$('#searchTags').on('blur', function(e) {
updateQuery();
- });
+ }).keypress(startSearchOnEnter);
$('#searchFileType').on('change', function(e) {
updateQuery();
@@ -92,6 +92,14 @@ define(function(require, exports, module) {
}
};
+ function startSearchOnEnter(e) {
+ if(e.which == 13) {
+ e.preventDefault();
+ updateQuery();
+ startSearch();
+ }
+ }
+
//function parseQuery() {}
function updateQuery() {