Reverted auto attach JavaScript in order to be consistent with the core managed_file element.