mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
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:
parent
26dbc07b98
commit
9f660f9db8
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue