Fixed Upload New Image button not working in Pagebuilder when trying to change image #39576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Preconditions (*)
Description (*)
In Adminside, The image is uploaded for the first time in pagebuilder. When we try to change the uploaded image then the 'Upload New Image' button does not work.
Related Issue
Fixes #39063
Manual testing scenarios (*)
appear.
issue-reproduce.mp4
Expected result
You should be able to upload new images after clicking "Upload New Image".
Actual result
No response when clicking "Upload New Image".
Additional Information
File: magento/module-ui/view/base/web/js/form/element/file-uploader.js
In Magento 2.4.7, the jQuery file uploader (jquery.fileuploader.js) has been replaced with Uppy (uppy.min.js), leading to changes in the JS logic of file-uploader.js. The replaceInputTypeFile function binds the click event only to the "Upload Image" button inside .pagebuilder-image-empty-preview (used when no image is uploaded). However, it misses the button in the toolbar that appears on hover for content types like Banner, Slider, and Image (when an image is already uploaded).
Contribution checklist (*)