Skip to content

Commit 4118be3

Browse files
committed
Submit on enter
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
1 parent b9a0825 commit 4118be3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/js/js.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,7 @@ OC.PasswordConfirmation = {
15241524
callback: null,
15251525

15261526
init: function() {
1527+
var self = this;
15271528
this.$form = $('#sudo-login-form');
15281529
this.$background = $('#sudo-login-background');
15291530
this.$input = this.$form.find('.question');
@@ -1532,6 +1533,11 @@ OC.PasswordConfirmation = {
15321533
this.$background.on('click', _.bind(this._fadeOut, this));
15331534
$('.password-confirm-required').on('click', _.bind(this.requirePasswordConfirmation, this));
15341535
this.$submit.on('click', _.bind(this._submitPasswordConfirmation, this));
1536+
this.$input.keyup(function(e) {
1537+
if (e.keyCode === 13) {
1538+
self._submitPasswordConfirmation();
1539+
}
1540+
});
15351541
},
15361542

15371543
requiresPasswordConfirmation: function() {

0 commit comments

Comments
 (0)