Repository: vscode
Issue: Undo/Redo <input /> is not working in vscode.CustomTextEditorProvider
Labels: bug,help wanted,custom-editors

Type: <b>Bug</b>

1. Clone the custom-editor-sample: https://github.com/microsoft/vscode-extension-samples/tree/main/custom-editor-sample

2. Add `<input />` in the html
![image](https://github.com/microsoft/vscode/assets/10402518/e7df8f28-fe72-478b-a92b-b8e8710a58fa)

3. Run the extension sample, then create and open a .cscratch file

4. Edit the `<input />`, then try to undo/redo its content.
<img width="490" alt="image" src="https://github.com/microsoft/vscode/assets/10402518/d04e34fa-0145-46e2-b2ef-9094f6073523">
<img width="528" alt="image" src="https://github.com/microsoft/vscode/assets/10402518/9b5bed0d-4c55-4357-9763-ea792c55d35c">

5. You will find that, the `<input />` will not be changed, but the file will.

In some old versions of vscode, the `<input />` works fine.



VS Code version: Code 1.78.1 (Universal) (6a995c4f4cc2ced6e3237749973982e751cb0bf9, 2023-05-04T09:57:42.343Z)
OS version: Darwin x64 22.4.0
Modes:
Sandboxed: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|3, 4, 4|
|Memory (System)|16.00GB (0.01GB free)|
|Process Argv|--crash-reporter-id ce632be4-463b-4cd6-a5a3-f247d8da0cfe|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (33)</summary>

Extension|Author (truncated)|Version
---|---|---
vscode-svgviewer|css|2.0.0
vscode-eslint|dba|2.4.0
githistory|don|0.6.20
gitlens|eam|13.6.0
EditorConfig|Edi|0.16.4
prettier-vscode|esb|9.12.0
shell-format|fox|7.2.5
todo-tree|Gru|0.0.226
rest-client|hum|0.25.1
plantuml|jeb|2.17.5
qx-lc-vsc-ext|Kil|4.3.0
sso-vsc|Kil|1.3.0
work-station|Kil|1.4.2
string-manipulation|mar|0.5.7
git-graph|mhu|1.30.0
vscode-antlr4|mik|2.3.1
vscode-csscomb|mrm|5.3.2
vscode-json5|mrm|1.0.0
vscode-language-pack-zh-hans|MS-|1.78.2023051009
remote-wsl|ms-|0.78.5
vscode-jest|Ort|5.2.3
minapp-vscode|qiu|2.4.10
vscode-xml|red|0.25.0
LiveServer|rit|5.7.9
vscode-styled-components|sty|1.7.8
vscode-stylelint|sty|1.2.4
open-in-browser|tec|2.0.0
pdf|tom|1.2.2
vscode-mdx|uni|1.3.0
vscode-icons|vsc|12.4.0
volar|Vue|1.6.4
vscode-todo-highlight|way|1.0.5
vscode-import-cost|wix|3.3.0


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
3biah626:30602489
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30737416
azdwalk:30721579
pythonms35:30701012
pythonfmttext:30731395
fixhidewlkth:30730051
pythongtdpathcf:30739705

```

</details>

<!-- generated by issue reporter -->