Fix Enter key behaviour in Wikidata login form. Closes #2565 (#2566)

This commit is contained in:
Antonin Delpeuch 2020-04-26 15:39:10 +02:00 committed by GitHub
parent 1a0e187561
commit 6441a2a1f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -26,7 +26,7 @@
</tr> </tr>
</table> </table>
<div class="wikibase-login-buttons"> <div class="wikibase-login-buttons">
<button class="button cancel-button" bind="cancelButton1"></button> <button class="button cancel-button" type="button" bind="cancelButton1"></button>
<input class="button button-primary" type="submit" bind="loginButton"></input> <input class="button button-primary" type="submit" bind="loginButton"></input>
</div> </div>
</form> </form>
@ -34,10 +34,6 @@
<div class="wikibase-user-logout" bind="logoutArea"> <div class="wikibase-user-logout" bind="logoutArea">
<p><span bind="loggedInAs"></span> <p><span bind="loggedInAs"></span>
<a bind="loggedInUsername" target="_blank"></a></p> <a bind="loggedInUsername" target="_blank"></a></p>
<form bind="logoutForm" method="post">
<input type="hidden" name="wb-username" value="null" />
<input name="wb-password" type="hidden" value="null" />
</form>
<div class="wikibase-login-buttons"> <div class="wikibase-login-buttons">
<button class="button cancel-button" bind="cancelButton2"></button> <button class="button cancel-button" bind="cancelButton2"></button>
<button class="button button-primary" bind="logoutButton"></button> <button class="button button-primary" bind="logoutButton"></button>

View File

@ -39,6 +39,7 @@ ManageAccountDialog.display = function(logged_in_username, saved_credentials, ca
} }
this._level = DialogSystem.showDialog(frame); this._level = DialogSystem.showDialog(frame);
this._elmts.usernameInput.focus();
var dismiss = function() { var dismiss = function() {
DialogSystem.dismissUntil(self._level - 1); DialogSystem.dismissUntil(self._level - 1);