Product Editor: Disable autocomplete on product name field (#39211)

This commit is contained in:
Matt Sherman 2023-07-13 10:09:59 -04:00 committed by GitHub
parent ed877abac6
commit a51f384021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Disable autocomplete for the product name field.

View File

@ -170,6 +170,8 @@ export function Edit( { attributes }: BlockEditProps< NameBlockAttributes > ) {
) }
onChange={ setName }
value={ name && name !== AUTO_DRAFT_NAME ? name : '' }
autoComplete="off"
data-1p-ignore
onBlur={ () => {
setSkuIfEmpty();
validateName();