Changeset 59187
- Timestamp:
- 10/07/2024 02:47:18 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/media.js
r57231 r59187 145 145 $mediaGridWrap = $( '#wp-media-grid' ), 146 146 copyAttachmentURLClipboard = new ClipboardJS( '.copy-attachment-url.media-library' ), 147 copyAttachmentURLSuccessTimeout; 147 copyAttachmentURLSuccessTimeout, 148 previousSuccessElement = null; 148 149 149 150 // Opens a manage media frame into the grid. … … 225 226 event.clearSelection(); 226 227 228 // Checking if the previousSuccessElement is present, adding the hidden class to it. 229 if ( previousSuccessElement ) { 230 previousSuccessElement.addClass( 'hidden' ); 231 } 232 227 233 // Show success visual feedback. 228 234 clearTimeout( copyAttachmentURLSuccessTimeout ); … … 232 238 copyAttachmentURLSuccessTimeout = setTimeout( function() { 233 239 successElement.addClass( 'hidden' ); 240 // No need to store the previous success element further. 241 previousSuccessElement = null; 234 242 }, 3000 ); 243 244 previousSuccessElement = successElement; 235 245 236 246 // Handle success audible feedback.
Note: See TracChangeset
for help on using the changeset viewer.