Skip to content

Caption Not Updating in Opened Image After SavingΒ #1464

@gtwilliams03

Description

@gtwilliams03

Describe the bug
I registered a UI Element for an "edit caption" button. It works great (after setting trapFocus: false to allow typing into the input in a pop-up Modal). When I update and save an image caption, the caption (useCaption) in the footer of the opened image does not update. But if I close the opened image, the thumbnail for the image having the updated caption is updated, and if I reopen that same image, the caption is updated.

Is there a way to update the caption for the opened lightbox image upon saving?

To Reproduce
Steps to reproduce the behavior:

  1. Create image gallery.
  2. Open one of the images.
  3. Update the caption. The caption in the footer of the updated image will not update
  4. Close the opened image. The caption is updated in the image thumbnail (I added the image to the title prop)

Expected behavior
Opened image should receive the updated caption.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Caption is "Bob's Cottage6"

image

Proper caption showing in initially opened image

image

Opened edit caption modal

image

Updated edit caption modal

image

Updated caption showing in state, but not in opened image

image

Updated caption does show in image gallery when the lightbox is closed

Desktop (please complete the following information):

  • OS: MacOS 15.2
  • Browser Chrome
  • Version 131.0.6778.140

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions