This commit is contained in:
Mirco Wittrien 2019-12-21 11:47:27 +01:00
parent 9f49c6d846
commit 28d996de32
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ class CharCounter {
processChannelTextAreaContainer (e) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {name: "ChannelEditorContainer"});
if (index > -1 && children[index].props.type && this.maxLenghts[children[index].props.type]) {
if (index > -1 && children[index].props.type && this.maxLenghts[children[index].props.type] && !children[index].props.disabled) {
if (!BDFDB.ArrayUtils.is(e.returnvalue.props.children)) e.returnvalue.props.children = [e.returnvalue.props.children];
this.injectCounter(e.returnvalue, e.returnvalue.props.children, children[index].props.type, BDFDB.dotCN.textarea, true);
}

View File

@ -253,7 +253,7 @@ class GoogleTranslateOption {
processChannelTextAreaContainer (e) {
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {name: "ChannelEditorContainer"});
if (index > -1 && children[index].props.type == BDFDB.DiscordConstants.TextareaTypes.NORMAL) {
if (index > -1 && children[index].props.type == BDFDB.DiscordConstants.TextareaTypes.NORMAL && !children[index].props.disabled) {
let [children2, index2] = BDFDB.ReactUtils.findChildren(e.returnvalue, {props:[["className", BDFDB.disCN.textareapickerbuttons]]});
if (index2 > -1 && children2[index2].props && children2[index2].props.children) children2[index2].props.children.unshift(this.createTranslateButton());
}