id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 22887,"JavaScript inserted using ""attachment_fields_to_edit"" executes too early",liviumirea,,"If I add JavaScript using ', 'value' => 0 ); return $form_fields; } }}} This should always pop a message box containing ""1"" (i.e. the number of elements found with the ""bug_test_div"" id), but it doesn't in the following situation: Access the admin panel, add a new post and click on the ""Add Media"" button. Upload an image and you will get a message box saying ""1"". Good. Now upload another image and select it. Now you'll get ""0"" instead of ""1"". Select the previous image or any other image and you will still get ""0"" instead of ""1"". Note that this works without a problem (i.e. always outputs ""1"") in the ""Admin panel -> Media -> Edit Media"" pages. ",defect (bug),closed,normal,,Media,3.5,normal,wontfix,close,,javascript