Opened 6 years ago
Last modified 4 years ago
#45886 assigned defect (bug)
Media modal .edit-attachment link opens in new tab rather than in modal
Reported by: | statelessstudio | Owned by: | antpb |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 5.0.2 |
Component: | Media | Keywords: | needs-patch |
Focuses: | javascript | Cc: |
Description
Using the wp.media
JavaScript API creates a link "Edit Image" (.edit-attachment
) in the right sidebar of the Media modal. Expected behavior would be to open the "Edit Image" modal, as does the Featured Image media modal.
However, the custom Media modal does not behave consistently with the Featured Image modal - the .edit-attachment
link opens in a new tab instead of the modal - which is both unintuitive and frustrating to end-users.
The console does not display any warnings or errors.
Custom media modal as documented: https://codex.wordpress.org/Javascript_Reference/wp.media
As a side note, I have noticed similar behavior in the WordPress Media page:
Media (Admin Sidebar) -> Click a picture -> Edit more Details
This also fails to open the modal - and opens in the current page instead.
Attachments (1)
Change History (8)
#1
@
6 years ago
- Focuses javascript added
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.3
Hi @statelessstudio,
I can confirm that I am able to reproduce this behavior, but it seems to happen even in the featured image panel of the new block editor. I've not noticed this before, so I'm wondering if this is a regression in one of the last few releases. I'm going to add this to the next release milestone to investigate.
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
#3
@
5 years ago
- Milestone changed from 5.3 to 5.4
It's looking a little late in the 5.3 release cycle to tackle this. I think we should move this to 5.4. Still a bit of investigation needed here.
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
5 years ago
#5
@
5 years ago
- Owner set to antpb
- Status changed from new to assigned
Setting myself as owner so that I can keep visibility into this issue as I work on tasks similar to this one. Will provide an update to let everyone know if this is possible in the 5.4 timeline. Thanks!
#6
@
5 years ago
- Milestone changed from 5.4 to Future Release
Hi,
This ticket still needs a patch.
With 5.4 Beta 3 approaching and the Beta period reserved for bugs introduced during the cycle, this is being moved to Future Release. If any maintainer or committer feels this should be included or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.
#7
@
4 years ago
Hum, I'm not sure to understand the issue here.
I'm currently running the last version on trunk. I am on Media Library grid, I click on a image to open the popup modal, I click on Edit image button and it loads the edit image modal properly. If I click on Edit more details link, I am redirected to the attachment edit page which seems normal.
Then, in edit post page, if I add a media through the popup or the featured image, I can click on Edit image link and it loads the popup properly, I am not redirected anywhere.
Did I miss some steps to reproduce?
Source code to recreate issue