From add4b14cd9515461c4bb4bf5892e287095ea3ad4 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 17 Jul 2016 12:49:24 +0200 Subject: [PATCH] Set timeout to zero in media editor code --- wcfsetup/install/files/js/WoltLab/WCF/Media/Editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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', -- 2.20.1