herp-a-derp/Corruption-of-Champions — pull request #49 by Gedan (2013-11-20 20:16:04+00:00)
Title: Cleaned up the image padding code, forced the scrollbar back into line.

Forced a scrollbar update during the image padding insertion. Quoth the comment block in ImageManager.cs:

Handwavey Bullshit Internals (aka This is probably whats going on but I'm not 100% sure):
TextField.htmlText doesn't continually "parse" content added to it, it's done at the end of a frame when the property has changed.
(TextField has two internal properties to check its current displayed content after parsing, and what other code has told it to have there, the difference is only resolved on EVENT.EXIT_FRAME or EVENT.ENTER_FRAME, I'm not sure which but thats basically the mechanic in play)
TextField never directly updates the UIScrollBar, it's kinda the other way around but not really; the UIScrollBar targets a specific DisplayObject and targets specific properties thereof. It's probably (internally) adding a listener to EVENT.CHANGE which, I believe, will only be fired when the textfields internal text property is updated (ie not htmlText but the comparison with it). Anything that changes the actual content layout of the TextField (and thus the maxScrollV property, which tracks the maximum number of lines displayed via the text field) does not fire the event.

In summary. ADOBE DURR. This kind of stupid, half-implemented interaction between base UI components is systematic.