зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1854056 - using bullet in autofill previews instead of * r=mtigley,credential-management-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D191360
This commit is contained in:
Родитель
6a8780f64d
Коммит
097aac74ea
|
@ -141,8 +141,8 @@
|
|||
this.getAttribute("ac-value")
|
||||
);
|
||||
|
||||
this._label.textContent = primary;
|
||||
this._comment.textContent = secondary;
|
||||
this._label.textContent = primary.replaceAll("*", "•");
|
||||
this._comment.textContent = secondary.replaceAll("*", "•");
|
||||
if (ariaLabel) {
|
||||
this.setAttribute("aria-label", ariaLabel);
|
||||
}
|
||||
|
|
|
@ -417,7 +417,11 @@ export class CreditCardResult extends ProfileAutoCompleteResult {
|
|||
const ccTypeName = ccTypeL10nId
|
||||
? lazy.l10n.formatValueSync(ccTypeL10nId)
|
||||
: ccType ?? ""; // Unknown card type
|
||||
const ariaLabel = [ccTypeName, primary.toString().replaceAll("*", ""), secondary]
|
||||
const ariaLabel = [
|
||||
ccTypeName,
|
||||
primary.toString().replaceAll("*", ""),
|
||||
secondary,
|
||||
]
|
||||
.filter(chunk => !!chunk) // Exclude empty chunks.
|
||||
.join(" ");
|
||||
return {
|
||||
|
|
|
@ -433,7 +433,7 @@ export class FormAutofillSection {
|
|||
// Skip the field if the user has already entered text and that text is not the site prefilled value.
|
||||
continue;
|
||||
}
|
||||
element.previewValue = value;
|
||||
element.previewValue = value.replaceAll?.("*", "•");
|
||||
this.handler.changeFieldState(
|
||||
fieldDetail,
|
||||
value ? FIELD_STATES.PREVIEW : FIELD_STATES.NORMAL
|
||||
|
|
Загрузка…
Ссылка в новой задаче