apostrophecms / apostrophecms/apostrophe

"Edit" Button in Image Manager Not Working Properly

Open
#4,868 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
4.6k
Forks
650
Avg merge
19h 21m
Merged PRs (30d)
23

Description

## To Reproduce

Step by step instructions to reproduce the behavior:

> 1. Modify an image widget.
> 2. Click on Browse Images.
> 3. Select an image from page 2 or later in the image manager modal.
> 4. Save the widget.
> 5. Reopen the Modify Image Widget.
> 6. Click Browse Images again.
> 7. Click on Edit in the preview of the previously selected image. (Notice that nothing happens.)
> 8. If you manually scroll down to page 2 (or the page where the image was originally selected) and then click Edit, it will work correctly.

## Expected behavior
> When clicking the "Edit" button on an image, the edit modal should open, regardless of whether the image is in the currently loaded set.

## Describe the bug
> When clicking the "Edit" button on an image that is not currently in the loaded set (e.g., after scrolling down), nothing happens. The edit functionality only works if the image is still visible in the current set.

## Details

**Version of Node.js:**
*v18.18.2*

**Server Operating System:**
*Linux/WSL2*

**Additional context:**
> The issue occurs in the image manager modal, and seems to be connected to how images are loaded dynamically with infinite scroll.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the image manager modal using an image selected from page 2 or later, then inspect how dynamically loaded images and the Edit action interact. Done means clicking Edit from the reopened widget opens the edit modal without manually scrolling to the image's original page.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.