Fix editing non-image media files
authorMatthias Schmidt <gravatronics@live.com>
Thu, 31 Oct 2019 14:03:58 +0000 (15:03 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 31 Oct 2019 14:03:58 +0000 (15:03 +0100)
See #2722

wcfsetup/install/files/js/WoltLabSuite/Core/Media/Editor.js

index dfad3d8122fd4292ac02e9579758e77e6f791121..9f5b8072dd77abaf752e852321f0a27f36f017af 100644 (file)
@@ -192,7 +192,7 @@ define(
                        }
                        
                        // captionEnableHtml
-                       this._media.captionEnableHtml = ~~elBySel('input[name=captionEnableHtml]', content).checked;
+                       if (captionEnableHtml) this._media.captionEnableHtml = ~~captionEnableHtml.checked;
                        
                        var aclValues = {
                                allowAll: ~~elById('mediaEditor_' + this._media.mediaID + '_aclAllowAll').checked,