diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-08-15 13:36:51 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-08-15 13:36:51 +0200 |
commit | 5f06380a4f4c8e49d8367825be119feba360b380 (patch) | |
tree | 4022a298a9402e6126d1d04c6fa91d106930bd6c | |
parent | c5c23b30b9f510ce211d9fa3187dc3c8cff4116e (diff) | |
download | nextcloud-server-5f06380a4f4c8e49d8367825be119feba360b380.tar.gz nextcloud-server-5f06380a4f4c8e49d8367825be119feba360b380.zip |
Trigger search after re-focus
If the share input field is unfocused, the autocomplete list is closed. Once
the field was focused again it was not properly opened again. This adds a
trigger to redo the search and show the results again.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r-- | core/js/sharedialogview.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 157887fbb94..6b65e46b254 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -70,6 +70,7 @@ shareeListView: undefined, events: { + 'focus .shareWithField': 'onShareWithFieldFocus', 'input .shareWithField': 'onShareWithFieldChanged' }, @@ -118,7 +119,8 @@ _.bindAll(this, 'autocompleteHandler', '_onSelectRecipient', - 'onShareWithFieldChanged' + 'onShareWithFieldChanged', + 'onShareWithFieldFocus' ); OC.Plugins.attach('OC.Share.ShareDialogView', this); @@ -131,6 +133,11 @@ } }, + /* trigger search after the field was re-selected */ + onShareWithFieldFocus: function() { + this.$el.find('.shareWithField').autocomplete("search"); + }, + autocompleteHandler: function (search, response) { var $shareWithField = $('.shareWithField'), view = this, |