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>
This commit is contained in:
parent
cd2d5b0b27
commit
faa83c3250
|
@ -70,6 +70,7 @@
|
||||||
shareeListView: undefined,
|
shareeListView: undefined,
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
|
'focus .shareWithField': 'onShareWithFieldFocus',
|
||||||
'input .shareWithField': 'onShareWithFieldChanged'
|
'input .shareWithField': 'onShareWithFieldChanged'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -118,7 +119,8 @@
|
||||||
_.bindAll(this,
|
_.bindAll(this,
|
||||||
'autocompleteHandler',
|
'autocompleteHandler',
|
||||||
'_onSelectRecipient',
|
'_onSelectRecipient',
|
||||||
'onShareWithFieldChanged'
|
'onShareWithFieldChanged',
|
||||||
|
'onShareWithFieldFocus'
|
||||||
);
|
);
|
||||||
|
|
||||||
OC.Plugins.attach('OC.Share.ShareDialogView', this);
|
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) {
|
autocompleteHandler: function (search, response) {
|
||||||
var $shareWithField = $('.shareWithField'),
|
var $shareWithField = $('.shareWithField'),
|
||||||
view = this,
|
view = this,
|
||||||
|
|
Loading…
Reference in New Issue