server/core/js/tests/specs
Daniel Calviño Sánchez 10a4f8e45e Confirm a share also by pressing enter on the input field
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>
2018-03-20 19:09:05 +01:00
..
files Merge pull request #6079 from nextcloud/fix-antivirus 2017-12-11 17:12:02 +01:00
systemtags Adjust the JS unit tests 2016-12-06 17:50:57 +01:00
appsSpec.js Fix javascript tests for sidebar animation 2016-07-30 16:30:05 +02:00
contactsmenuSpec.js There was an error loading → could not load 2018-01-20 09:15:50 +01:00
coreSpec.js Add CSRF token controller to retrieve the current CSRF token 2018-03-08 16:48:50 +01:00
jquery.avatarSpec.js Fix tests 2018-01-08 10:36:06 +01:00
jquery.contactsmenuSpec.js handle 404 separately 2017-04-26 09:30:21 +02:00
l10nSpec.js Harden t() with DOMPurify 2017-03-16 14:17:42 +01:00
mimeTypeSpec.js Reduce JSHint errors/warnings 2017-11-06 09:57:59 +01:00
oc-backbone-webdavSpec.js
setupchecksSpec.js Spelling: FreeType 2018-01-14 16:01:23 +01:00
sharedialoglinkshareview.js Reduce JSHint errors/warnings 2017-11-06 09:57:59 +01:00
sharedialogshareelistview.js Update tests for indeterminate state, fix slashes not being escaped 2018-02-16 11:42:41 +01:00
sharedialogviewSpec.js Confirm a share also by pressing enter on the input field 2018-03-20 19:09:05 +01:00
shareitemmodelSpec.js Fix share capabilities JS tests 2018-02-27 12:29:25 +01:00
shareSpec.js Merge pull request #6670 from nextcloud/handle-encryption-state-in-web-interface 2017-12-06 16:19:17 +01:00