Esanders has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/379732 )
Change subject: Wait for document render before first alignment ...................................................................... Wait for document render before first alignment Change-Id: I17e2aab69176516f8fb7df859de0b98b438f696e --- M modules/ui/mw.cx.ui.TranslationView.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/32/379732/1 diff --git a/modules/ui/mw.cx.ui.TranslationView.js b/modules/ui/mw.cx.ui.TranslationView.js index 4317e7c..775fd72 100644 --- a/modules/ui/mw.cx.ui.TranslationView.js +++ b/modules/ui/mw.cx.ui.TranslationView.js @@ -195,7 +195,6 @@ this.targetColumn.attachSurface( targetSurface ); sourceSurface.initialize(); targetSurface.initialize(); - this.throttleAlignSectionPairs(); sourceSurface.getView().$element.on( { mouseover: this.onSurfaceMouseOver.bind( this ), mouseout: this.onSurfaceMouseOut.bind( this ) @@ -206,6 +205,8 @@ } ); $( this.getElementWindow() ).on( 'resize', this.throttleAlignSectionPairs ); + // Wait for document to render fully + setTimeout( this.throttleAlignSectionPairs.bind( this ) ); }; mw.cx.ui.TranslationView.prototype.getTranslation = function () { -- To view, visit https://gerrit.wikimedia.org/r/379732 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I17e2aab69176516f8fb7df859de0b98b438f696e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits