Last modified: 2014-11-17 10:35:08 UTC
The id #mw-content-text, as I understand it, is normally attached to the .mw-content-ltr/rtl div so that the element directly holding the content is accessible through javascript. However, during preview, the ID is instead attached to a different element, which has #wikiPreview as a child element, which then has an ID-less (and thus inaccessible) .mw-content-ltr/rtl div holding the content. #mw-content-text should consistently be the content-holding div.
Related issue (I think): API action=parse does not return div.mw-content-ltr so all "ajax preview" userscripts miss some global CSS, one example is ".mw-content-ltr .magnify {float: right}" for thumb images.