Restore async rendering of ReferenceContextItem

We moved toward serialization, but in the case where we don't have a
rendering yet and it's happening async, we need to use the same DOM
container that will be rendered into.

Bug: T91336
Change-Id: I53920591fde02175d4162b1fe5899b97b10a5b0f
This commit is contained in:
Trevor Parscal 2015-03-18 16:22:02 -07:00 committed by Trevor Parscal
parent 26dbc07b98
commit 9f660f9db8

View file

@ -62,10 +62,12 @@ ve.ui.MWReferenceContextItem.prototype.getRendering = function () {
// Make all links open in a new window
view.$element.find( 'a' ).attr( 'target', '_blank' );
// Cleanup
view.destroy();
// Strip the HTML rendering of any events that might be still bound to it
return $( view.$element.html() );
// HACK: Use the $element property of the view, which will be updated asynchronously despite
// having been destroyed
return view.$element;
};
/**