From e8e898ede8b7655f9c4e61834d2a038b009bc6cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20H=C3=A4rtl?= <jus@bitgrid.net>
Date: Thu, 25 Oct 2018 21:36:44 +0200
Subject: [PATCH] Use tab to complete selected entry to the share entry
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Julius Härtl <jus@bitgrid.net>
---
 core/js/sharedialogview.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
index 9709c734f60..cd7f07011c3 100644
--- a/core/js/sharedialogview.js
+++ b/core/js/sharedialogview.js
@@ -539,6 +539,16 @@
 		_onSelectRecipient: function(e, s) {
 			var self = this;
 
+			if (e.keyCode == 9) {
+				e.preventDefault();
+				e.target.value = s.item.label;
+				setTimeout(function() {
+					$(e.target).attr('disabled', false)
+						.autocomplete('search', $(e.target).val());
+				}, 0);
+				return false;
+			}
+
 			e.preventDefault();
 			// Ensure that the keydown handler for the input field is not
 			// called; otherwise it would try to add the recipient again, which
-- 
GitLab