A platform for community discussion. Free, open, simple.
DEV: removes code block enter edge case (#31773)
Joffrey JAFFEUX1f2043de4e7f
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer.js b/plugins/chat/assets/javascripts/discourse/components/chat-composer.jsindex 9b2735a6c96..1bb7d54f0e1 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer.js+++ b/plugins/chat/assets/javascripts/discourse/components/chat-composer.js@@ -359,12 +359,6 @@ export default class ChatComposer extends Component {}if (event.key === "Enter") {- // if we are inside a code block just insert newline- const { pre } = this.composer.textarea.getSelected({ lineVal: true });- if (this.composer.textarea.isInside(pre, /(^|\n)```/g)) {- return;- }-const shortcutPreference =this.currentUser.user_option.chat_send_shortcut;const send =