diff --git a/src/core/components/auth/api-key-auth.jsx b/src/core/components/auth/api-key-auth.jsx
index 105e7c65e9a..c4eb2dff9d7 100644
--- a/src/core/components/auth/api-key-auth.jsx
+++ b/src/core/components/auth/api-key-auth.jsx
@@ -70,7 +70,7 @@ export default class ApiKeyAuth extends React.Component {
{
value ? ******
- :
+ :
}
{
diff --git a/src/core/components/auth/basic-auth.jsx b/src/core/components/auth/basic-auth.jsx
index e0ccd1fcff9..26cd5c7f2c7 100644
--- a/src/core/components/auth/basic-auth.jsx
+++ b/src/core/components/auth/basic-auth.jsx
@@ -66,7 +66,7 @@ export default class BasicAuth extends React.Component {
{
username ? { username }
- :
+ :
}
diff --git a/src/core/components/auth/oauth2.jsx b/src/core/components/auth/oauth2.jsx
index 3dc042cb75e..5daa2143a4a 100644
--- a/src/core/components/auth/oauth2.jsx
+++ b/src/core/components/auth/oauth2.jsx
@@ -148,7 +148,7 @@ export default class Oauth2 extends React.Component {
{
isAuthorized ? { this.state.username }
:
-
+
}
diff --git a/test/e2e-cypress/tests/features/oauth2-flows/application.js b/test/e2e-cypress/tests/features/oauth2-flows/application.js
index 90446198ab7..739cfc7af35 100644
--- a/test/e2e-cypress/tests/features/oauth2-flows/application.js
+++ b/test/e2e-cypress/tests/features/oauth2-flows/application.js
@@ -7,6 +7,17 @@ describe("OAuth2 Application flow", function() {
}).as("tokenRequest")
})
+ // https://github.com/swagger-api/swagger-ui/issues/6395
+ it("should have first authorization input autofocused", () => {
+ cy
+ .visit("/?url=http://localhost:3231/swagger.yaml")
+ .get(".btn.authorize")
+ .click()
+
+ cy.focused()
+ .should("have.id", "oauth_username")
+ })
+
it("should make an application flow Authorization header request", () => {
cy
.visit("/?url=http://localhost:3231/swagger.yaml")
@@ -52,4 +63,4 @@ describe("OAuth2 Application flow", function() {
.get(".live-responses-table .response-col_status")
.contains("200")
})
-})
\ No newline at end of file
+})