Merge pull request #19536 from owncloud/share-focusonsharefield

Focus on share field after first display
This commit is contained in:
Thomas Müller 2015-10-02 17:50:04 +02:00
commit fee8486b7f
1 changed files with 8 additions and 1 deletions

View File

@ -174,12 +174,19 @@
// only show the loading spinner for the first request (for now)
if (!this._loadingOnce) {
this._toggleLoading(true);
this._loadingOnce = true;
}
},
_onEndRequest: function() {
var self = this;
this._toggleLoading(false);
if (!this._loadingOnce) {
this._loadingOnce = true;
// the first time, focus on the share field after the spinner disappeared
_.defer(function() {
self.$('#shareWith').focus();
});
}
},
render: function() {