From 3c7bd9bbd3794743047f96b6323ab7bca83c739d Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 22 Aug 2024 10:18:16 +0100 Subject: [PATCH] FIX: Tool editing code editor resetting on every keypress (#765) `withEventValue` is not needed here, because the `onChange` event comes from ace, not a normal DOM event. But even with that fix, it seems AceEditor doesn't yet work well with the DDAU pattern. On every keypress, the editor re-renders and puts the cursor back at the beginning. For now, this commit removes the `@onChange` hook, so we go back to relying on the two-way binding of `@content`. Followup to a5a39dd2ee5a71365cd349cabc1f34e261235d24 --- assets/javascripts/discourse/components/ai-tool-editor.gjs | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/javascripts/discourse/components/ai-tool-editor.gjs b/assets/javascripts/discourse/components/ai-tool-editor.gjs index 2dbd70d3..1a071035 100644 --- a/assets/javascripts/discourse/components/ai-tool-editor.gjs +++ b/assets/javascripts/discourse/components/ai-tool-editor.gjs @@ -192,7 +192,6 @@ export default class AiToolEditor extends Component {