Skip to content

Commit 46fec08

Browse files
Block editor: Image link update active status when lightbox is enabled (#58490)
* Update label; update active status when lightbox is enabled * Update e2e with label change --------- Co-authored-by: Ricardo Artemio Morales <[email protected]>
1 parent 05eb127 commit 46fec08

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/block-editor/src/components/url-popover/image-url-input-ui.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,11 @@ const ImageURLInputUI = ( {
241241
<ToolbarButton
242242
icon={ linkIcon }
243243
className="components-toolbar__control"
244-
label={ url ? __( 'Edit link' ) : __( 'Add link' ) }
244+
label={ __( 'Link' ) }
245245
aria-expanded={ isOpen }
246246
onClick={ openLinkUI }
247247
ref={ setPopoverAnchor }
248-
isActive={ !! url }
248+
isActive={ !! url || lightboxEnabled }
249249
/>
250250
{ isOpen && (
251251
<URLPopover

test/e2e/specs/editor/blocks/image.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ test.describe( 'Image', () => {
670670
imageBlock.locator( 'data-testid=form-file-upload-input' )
671671
);
672672

673-
await page.getByLabel( 'Block tools' ).getByLabel( 'Add link' ).click();
673+
await page.getByLabel( 'Block tools' ).getByLabel( 'Link' ).click();
674674

675675
// This form lacks distinguishing qualities other than the
676676
// class name, so we use page.locator() instead of page.getByRole()

0 commit comments

Comments
 (0)