Skip to content

fix(Editor): (Codex) 修复 ScriptEditor toolbar 中编辑相关操作的交互问题#1417

Open
cyfung1031 wants to merge 1 commit intorelease/v1.4from
fix/scriptEditor/toolbar-button-malfunction
Open

fix(Editor): (Codex) 修复 ScriptEditor toolbar 中编辑相关操作的交互问题#1417
cyfung1031 wants to merge 1 commit intorelease/v1.4from
fix/scriptEditor/toolbar-button-malfunction

Conversation

@cyfung1031
Copy link
Copy Markdown
Collaborator

Checklist / 检查清单

  • Fixes mentioned issues / 修复已提及的问题
  • Code reviewed by human / 代码通过人工检查
  • Changes tested / 已完成测试

Description / 描述

  • 修复 toolbar 的剪切、复制、粘贴在菜单点击后失效的问题。
  • 剪切、复制改为直接读取 Monaco 当前选区并写入剪贴板,避免依赖 Dropdown 中不稳定的 Monaco clipboard action。
  • 粘贴改为通过 navigator.clipboard.readText() 读取剪贴板内容,再交给 Monaco paste handler 插入。
  • 修复 toolbar 点击导致编辑器选区/焦点丢失的问题。
  • 修复通过 toolbar 执行 undo/redo 后,CodeEditor 光标消失的问题。
  • 将编辑器变更监听从键盘事件改为 Monaco 内容变更事件,确保剪切、粘贴、格式化、undo/redo 等非键盘输入也能正确更新编辑状态。

Screenshots / 截图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant