allow focusing to description block
This commit is contained in:
parent
74e2e166c0
commit
d602d928e5
|
@ -84,6 +84,7 @@ export function DescriptionBlockEdit( {
|
|||
|
||||
const blockProps = useWooBlockProps( attributes, {
|
||||
className: classNames( { 'has-blocks': !! description.length } ),
|
||||
tabIndex: 0,
|
||||
} );
|
||||
|
||||
const innerBlockProps = useInnerBlocksProps(
|
||||
|
@ -107,10 +108,7 @@ export function DescriptionBlockEdit( {
|
|||
{ ! description.length && <div { ...innerBlockProps } /> }
|
||||
|
||||
{ !! description.length && (
|
||||
<div
|
||||
tabIndex={ 0 }
|
||||
className="wp-block-woocommerce-product-description-field__cover"
|
||||
/>
|
||||
<div className="wp-block-woocommerce-product-description-field__cover" />
|
||||
) }
|
||||
|
||||
{ !! description.length && (
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
|
||||
.wp-block-woocommerce-product-description-field {
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
||||
outline: 3px solid transparent;
|
||||
}
|
||||
|
||||
&.has-blocks {
|
||||
min-height: 320px;
|
||||
.wp-block-woocommerce-product-description-field__cover,
|
||||
|
|
Loading…
Reference in New Issue