Skip to content

Commit 1ccd730

Browse files
committed
Auto merge of #1922 - integer32llc:fix-revoke-button, r=carols10cents
Revert "replace jQuery with native logic" This reverts commit e6e3c6b. cc @locks; the "revoke" button for API tokens is throwing an error currently, and reverting this commit fixes it. I'm not sure why yet, but I want to fix production so I'm going to merge this when it passes CI and deploy it, then we can work on redoing this commit.
2 parents 307930e + 34ac4e0 commit 1ccd730

File tree

3 files changed

+4
-26
lines changed

3 files changed

+4
-26
lines changed

app/components/api-token-row.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ export default Component.extend({
77
serverError: null,
88

99
didInsertElement() {
10-
let input = this.element.querySelector('input');
11-
if (input.focus) {
12-
input.focus();
10+
if (this.get('api_token.isNew')) {
11+
this.$('input').focus();
1312
}
1413
},
1514

app/templates/components/api-token-row.hbs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
placeholder="New token name"
77
disabled=api_token.isSaving
88
value=api_token.name
9-
autofocus="autofocus"
10-
enter="saveToken"
11-
data-test-focused-input=true
12-
}}
9+
autofocus=true
10+
enter="saveToken"}}
1311
{{else}}
1412
{{ api_token.name }}
1513
{{/if}}

tests/integration/components/api-token-row-test.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)