Priority/Severity: low-medium?
Platform: Tested in Firefox. discourse data explorer plugin starting from commit d31d899 - Aug 27, 2024.
Description:
When editing in the data explorer editor, the cursor position is not remembered between each content change, and is moved to the start of the editor.
Reproducible steps:
- ensure data explorer plugin is updated to latest
- go to data explorer in admin page
- create a new query
- attempt to change the query in the editor
Initial Analysis:
This seems to be caused by the following commit, which adds an @onChange event hook that mutates the sql query content, causing the @content prop to update with new content.
https://github.com/discourse/discourse-data-explorer/commit/d31d89942ec9ad10a943ba2395e1eb13168240e4
Rolling back to before the above commit in a dev env, the editor interacted normally.