Hi @marijn,
Its difficult to explain so I recorded it. pgadmin-copy-cm-issue.mov - Google Drive
Basically, when I select something in codemirror, then go to some outside element and hit copy - then it still copies codemirror text. When I do the same thing but before going to outside element, I focus on a input element like textarea, then go to some outside element and hit copy - then it works fine.
Issue raised in pgAdmin - Ctrl+C to copy does not work in data grid · Issue #7920 · pgadmin-org/pgadmin4 · GitHub
Edited: The grid below handles keydown and on ctrl+c copies the code to clipboard. I tried to preventDefault/stopPropagation from grid but it didn’t work.
Appreciate your efforts.