Browse Source

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>
tags/v13.0.0beta1
Morris Jobke 6 years ago
parent
commit
5f06380a4f
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      core/js/sharedialogview.js

+ 8
- 1
core/js/sharedialogview.js View File

@@ -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,

Loading…
Cancel
Save