Microsoft/monaco-editor

Native browser undo/redo commands take incorrect effect to the editor content

Open

#2,346 创建于 2021年2月10日

在 GitHub 查看
 (0 评论) (11 反应) (0 负责人)JavaScript (1,283 fork)batch import
bugeditor-inputhelp wanted

仓库指标

Star
 (14,836 star)
PR 合并指标
 (平均合并 6小时 26分钟) (30 天内合并 15 个 PR)

描述

monaco-editor version: 0.22.3 Browser: Firefox 85 OS: Windows 10 Playground code that reproduces the issue:

function x() {
	console.log("Hello world!");
}

I've reproduced it by the following steps:

  1. Start Monaco playground.
  2. Type some text.
  3. Click the Undo item in the browser menu bar.
  4. Nothing happens.
  5. Click the Redo item in the browser menu bar.
  6. The entered text will be duplicated.
  7. Also, doesn't work with document.execCommand('undo') in Chrome.

monaco-editor-undo-redo

贡献者指南