﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13888	image2: editor.config.image2_captionedClass is not removed when going from captioned to uncaptioned with Drupal's extended image2	Wim Leers		"== Steps to reproduce ==
From https://www.drupal.org/node/2268941:

A:
- Add an image in a ckeditor area, leave the ""caption"" option unchecked
- Save
--> OK, the img tag that gets produced only has the 'align-*' class (if an alignement was chosen)

B:
- Add an image in a ckeditor area, check the ""caption"" option
- Re-edit the image, and uncheck the ""caption"" option
- Save
--> NOK, the img tag has the 'caption' and 'img-caption' classes. I'd expect A and B to produce the same final markup.

== Other details (browser, OS, CKEditor version, installed plugins) ==
I already spent a lot of time debugging image2, and was unable to pinpoint the cause. Somehow, the widget's `data` suddenly contains `data.classes == editor.config.image2_captionedClass`, but I'm not sure how this happens. It seems to be a race condition almost.

Debugging changes made to a widget's `data` is a massive PITA, or at least, I haven't figured out yet where to put breakpoints to make debugging this more doable."	Bug	new	Normal		General	4.5.3		Drupal	wim.leers@…
