diff --git a/docroot/sites/all/modules/media/js/media.js b/docroot/sites/all/modules/media/js/media.js index dba97f6..19a34b2 100644 --- a/docroot/sites/all/modules/media/js/media.js +++ b/docroot/sites/all/modules/media/js/media.js @@ -43,6 +43,15 @@ fidField.val(mediaFile.fid); // Set the preview field HTML. previewField.html(mediaFile.preview); + // Prevent IE(7,8) lose focus + // First we set the alt title as node title as default + // var alt = $('.form-item.form-item-title label'); + // Get the image alt field + if($(this).parent().find('div.form-type-textfield label').length > 0){ + // Set the label for alt + var alt = $(this).parent().find('div.form-type-textfield label'); + alt.click(); + } // Show the Remove button. removeButton.show(); }, globalOptions);