-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I encountered an issue while trying to replace a featured image in WordPress. When I navigate to the media library generated by AMF, and select a new image, the current featured image gets added/duplicated to the AMF media library.
Steps to Reproduce:
- Add a featured image to a post (it could be from the local library or the AMF-generated library).
- Click on the "Replace" Featured Image button.
- Navigate to the AMF-generated media library.
- Select a new image from the library.
I am assuming this is related to Wordpress as I can see js events are generating the li item(currently selected featured image item) to the library are written in Wordpress.
Is there any way I can fix this?
I have tried resetting the current selection when the media dialog is opened, but it doesn't seem to work
wp.media.featuredImage.frame().on('open', function() {
const frame = wp.media.featuredImage.frame();
const selection = frame.state().get('selection');
selection.reset();
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels