(core) Enabling clipboard events on Choice entry field

Summary: Copy/paste/cut events weren't available on choice entry field.

Test Plan: Updated tests

Reviewers: alexmojaki, paulfitz

Reviewed By: alexmojaki, paulfitz

Subscribers: alexmojaki

Differential Revision: https://phab.getgrist.com/D3476
This commit is contained in:
Jarosław Sadziński 2022-06-08 20:27:51 +02:00
parent d92a761f6e
commit 3b30c052bc

View File

@ -330,6 +330,9 @@ export class ChoiceListEntry extends Disposable {
// Don't bubble up keyboard events, use them for editing the text. // Don't bubble up keyboard events, use them for editing the text.
// Without this keys like Backspace, or Mod+a will propagate and modify all tokens. // Without this keys like Backspace, or Mod+a will propagate and modify all tokens.
dom.on('keydown', stopPropagation), dom.on('keydown', stopPropagation),
dom.on('copy', stopPropagation),
dom.on('cut', stopPropagation),
dom.on('paste', stopPropagation),
// On enter, focus on the input element. // On enter, focus on the input element.
dom.onKeyDown({ dom.onKeyDown({
Enter : focusOnNew Enter : focusOnNew