Fix smiley JavaScript for form builder wysiwyg component
authorMatthias Schmidt <gravatronics@live.com>
Wed, 20 Mar 2019 09:17:24 +0000 (10:17 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 20 Mar 2019 09:17:24 +0000 (10:17 +0100)
See 590cafbe734202ca00e779dfa39f6241caf55b8c
See #2852

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Smiley/Insert.js

index f87125910465e66e19adb0128762fcad9d510b28..8f83f1efb67885dc901192989f240d6a954ba515 100644 (file)
@@ -22,7 +22,11 @@ define(['EventHandler', 'EventKey'], function (EventHandler, EventKey) {
                        
                        var container = elById('smilies-' + this._editorId);
                        if (!container) {
-                               throw new Error('Unable to find the message tab menu container containing the smilies.');
+                               // form builder
+                               container = elById(this._editorId + 'SmiliesTabContainer');
+                               if (!container) {
+                                       throw new Error('Unable to find the message tab menu container containing the smilies.');
+                               }
                        }
                        
                        container.addEventListener('keydown', this._keydown.bind(this));