[wp-trac] [WordPress Trac] #36453: Disable 'replace' button in replace media frame while attachment is uploading
WordPress Trac
noreply at wordpress.org
Fri Apr 8 20:23:21 UTC 2016
#36453: Disable 'replace' button in replace media frame while attachment is
uploading
----------------------------+-----------------------------
Reporter: ungestaltbar | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: ui, javascript |
----------------------------+-----------------------------
Steps to reproduce:
1. Edit a post
2. Insert an image into the editor
3. Click on the image and chose 'edit' (pen icon)
4. Chose 'replace' in the dialog
5. Upload a new image.
6. Click on the 'replace' button while the image is still uploading
Console throws javascript error.
(possible) Solution:
Add the require option to the toolbar.items.replace button config,
around line 5082 in media-views.js
{{{
replace: {
style: 'primary',
text: l10n.replace,
priority: 80,
requires: { selection: true },
....
}}}
Tested version: Version 4.5-RC1-37153
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36453>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list