Steps to reproduce:

1 - Add a image field to any content type
2 - Go to add page of this content type
3 - Choose the file (some image)
4 - Click to remove the image
5 - Repeat the step 3 and 4 some times
6 - Check the html of the field

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

felribeiro created an issue. See original summary.

felribeiro’s picture

Version: 8.0.0-rc3 » 8.0.0

If we comment the line below, it works fine.

line 165
$form['#suffix'] .= '';

of the file
core/modules/file/src/Element/ManagedFile.php

cilefen’s picture

Title: Image field leaves a trash in html after remove the file. » Image field leaves trash divs in html after removing the file
Version: 8.0.0 » 8.0.x-dev
Issue tags: +Ajax

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

nod_’s picture