Skip to content

Commit 0907fd8

Browse files
authored
fix: prevent password manager from auto filling password subscription key field (#2818)
1 parent a25e846 commit 0907fd8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/components/operations/operation-details/ko/runtime/authorization.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ <h3 class="pt-0">
128128
<!-- ko if: (!$component.products() || $component.products().length === 0) && !isSubscriptionListEmptyDueToFilter() -->
129129
<div class="input-group">
130130
<input id="subscriptionKey" class="form-control" placeholder="subscription key"
131+
name="subscription-key"
132+
autoComplete="new-password"
131133
data-bind="textInput: $component.selectedSubscriptionKey.value, attr: { type: subscriptionKeyRevealed() ? 'text' : 'password' }"
132134
aria-required="true" />
133135
<button data-bind="click: toggleSubscriptionKey" class="input-group-addon">

src/components/operations/operation-details/react/runtime/operation-console/ConsoleAuthorization.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,13 @@ export const ConsoleAuthorization = ({
154154
: <Stack className="auth-detail">
155155
<Label htmlFor="subscription-key-input">Subscription key</Label>
156156
<Input
157-
id="subscription-key-input"
158-
type="password"
159-
placeholder="Enter subscription key"
160-
value={selectedSubscriptionKey?.value}
161-
onChange={(_, data) => selectSubscriptionKey(data.value)}
157+
id="subscription-key-input"
158+
type="password"
159+
name="subscription-key"
160+
autoComplete="new-password"
161+
placeholder="Enter subscription key"
162+
value={selectedSubscriptionKey?.value}
163+
onChange={(_, data) => selectSubscriptionKey(data.value)}
162164
/>
163165
</Stack>
164166
)}

0 commit comments

Comments
 (0)