Update MessageUtilities.plugin.js
This commit is contained in:
parent
c879f9b040
commit
52e65f6f95
|
@ -3,7 +3,7 @@
|
|||
class MessageUtilities {
|
||||
getName () {return "MessageUtilities";}
|
||||
|
||||
getVersion () {return "1.6.4";}
|
||||
getVersion () {return "1.6.5";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
|
@ -11,7 +11,7 @@ class MessageUtilities {
|
|||
|
||||
constructor () {
|
||||
this.changelog = {
|
||||
"fixed":[["New WYSIWYG Textarea","Fixed for the new WYSIWYG Textarea that is hidden by experiments"]],
|
||||
"fixed":[["Clear ESC","Works again"],["New WYSIWYG Textarea","Fixed for the new WYSIWYG Textarea that is hidden by experiments"]],
|
||||
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
|
||||
};
|
||||
|
||||
|
@ -384,8 +384,11 @@ class MessageUtilities {
|
|||
if (!this.isEventFired(name)) {
|
||||
this.fireEvent(name);
|
||||
if (key == 27 && BDFDB.DataUtils.get(this, "settings", "clearOnEscape")) {
|
||||
let instance = BDFDB.ReactUtils.findOwner(BDFDB.DOMUtils.getParent(BDFDB.dotCNS.chat + "form", target), {name:"ChannelTextAreaForm", up:true});
|
||||
if (instance) instance.setState({textValue:"", richValue:BDFDB.LibraryModules.SlateUtils.deserialize("")});
|
||||
let chatform = BDFDB.DOMUtils.getParent(BDFDB.dotCN.chatform, target);
|
||||
if (chatform) {
|
||||
let instance = BDFDB.ReactUtils.findOwner(chatform, {name:"ChannelTextAreaForm"}) || BDFDB.ReactUtils.findOwner(chatform, {name:"ChannelTextAreaForm", up:true});
|
||||
if (instance) instance.setState({textValue:"", richValue:BDFDB.LibraryModules.SlateUtils.deserialize("")});
|
||||
}
|
||||
}
|
||||
this.cancelEvent(name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue