From: Matthias Schmidt Date: Sun, 17 Jul 2016 10:49:24 +0000 (+0200) Subject: Set timeout to zero in media editor code X-Git-Tag: 3.0.0_Beta_1~1076 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=add4b14cd9515461c4bb4bf5892e287095ea3ad4;p=GitHub%2FWoltLab%2FWCF.git Set timeout to zero in media editor code --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Media/Editor.js b/wcfsetup/install/files/js/WoltLab/WCF/Media/Editor.js index 04335cceaa..7f2fbab9e1 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Media/Editor.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Media/Editor.js @@ -239,6 +239,7 @@ define( }, source: { after: (function(content, data) { + // make sure that the language chooser is initialized first setTimeout(function() { LanguageChooser.setLanguageId('languageID', this._media.languageID || LANGUAGE_ID); @@ -264,7 +265,7 @@ define( elById('mediaEditor_' + this._media.mediaID).parentNode.scrollTop = 0; DomChangeListener.trigger(); - }.bind(this), 100); + }.bind(this), 0); }).bind(this), data: { actionName: 'getEditorDialog',