10a4f8e45e
Besides confirming a share by clicking on the confirm button now it is possible to do it by pressing enter on the input field. Clicking on the confirm button implicitly hides the autocomplete dropdown. On the other hand, pressing enter on the input field does not, so the autocompletion must be disabled and closed when the confirmation begins and then enabled again once it finishes. Otherwise the autocomplete dropdown would be visible and it would be possible to interact with it while the share is being confirmed. The order in which the input field and the autompletion are disabled is important. Internally, the autocompletion sets a timeout when the input field is modified that requests the suggestions to the server and then shows them in the dropdown. That timeout is not cancelled when the autocompletion is disabled, but when the input field loses its focus and the autocompletion is not disabled. Therefore, the input field has to be disabled (which causes it to lose the focus) before the autocompletion is disabled. Otherwise it could happen that while a share is being confirmed the timeout ends, so an autocompletion request is sent and then, once the share is successfully confirmed and thus the autocompletion is enabled again, the request is received and the autocomplete dropdown is shown with the old suggestions. Strange, but possible nevertheless ;-) Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com> |
||
---|---|---|
.. | ||
files | ||
login | ||
public | ||
systemtags | ||
tests | ||
apps.js | ||
backgroundjobs.js | ||
config.js | ||
contactsmenu.js | ||
core.json | ||
eventsource.js | ||
installation.js | ||
integritycheck-failed-notification.js | ||
jquery-showpassword.js | ||
jquery-ui-fixes.js | ||
jquery.avatar.js | ||
jquery.contactsmenu.js | ||
jquery.ocdialog.js | ||
js.js | ||
l10n.js | ||
login.js | ||
lostpassword.js | ||
maintenance-check.js | ||
merged-login.json | ||
merged-share-backend.json | ||
merged-template-prepend.json | ||
mimetype.js | ||
mimetypelist.js | ||
multiselect.js | ||
oc-backbone-webdav.js | ||
oc-backbone.js | ||
oc-dialogs.js | ||
oc-requesttoken.js | ||
octemplate.js | ||
placeholder.js | ||
select2-toggleselect.js | ||
setup.js | ||
setupchecks.js | ||
share.js | ||
shareconfigmodel.js | ||
sharedialogexpirationview.js | ||
sharedialoglinkshareview.js | ||
sharedialogresharerinfoview.js | ||
sharedialogshareelistview.js | ||
sharedialogview.js | ||
shareitemmodel.js | ||
sharesocialmanager.js | ||
singleselect.js | ||
update.js | ||
visitortimezone.js |