From d36a62dcfef8be8c0ff4123b394a560c8da61fba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Magnus=20K=C3=BChn?= Date: Wed, 27 Mar 2013 15:21:52 +0100 Subject: [PATCH] A confirmation dialog can always be confirmed with return --- wcfsetup/install/files/js/WCF.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 5795b3892f..237ef41d3e 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -5240,6 +5240,12 @@ WCF.System.Confirmation = { */ _visible: false, + /** + * confirmation button + * @var jQuery + */ + _confirmationButton: null, + /** * Displays a confirmation dialog. * @@ -5283,6 +5289,7 @@ WCF.System.Confirmation = { this._dialog.wcfDialog('render'); } + this._confirmationButton.focus(); this._visible = true; }, @@ -5293,7 +5300,7 @@ WCF.System.Confirmation = { this._dialog = $('

').hide().appendTo(document.body); var $formButtons = $('
').appendTo(this._dialog); - $('').data('action', 'confirm').click($.proxy(this._click, this)).appendTo($formButtons); + this._confirmationButton = $('').data('action', 'confirm').click($.proxy(this._click, this)).appendTo($formButtons); $('').data('action', 'cancel').click($.proxy(this._click, this)).appendTo($formButtons); }, -- 2.20.1