From 3b30c052bca60b28469d1073e7235a061b9f7476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Wed, 8 Jun 2022 20:27:51 +0200 Subject: [PATCH] (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 --- app/client/widgets/ChoiceListEntry.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/client/widgets/ChoiceListEntry.ts b/app/client/widgets/ChoiceListEntry.ts index cc3e411a..69f30ddb 100644 --- a/app/client/widgets/ChoiceListEntry.ts +++ b/app/client/widgets/ChoiceListEntry.ts @@ -330,6 +330,9 @@ export class ChoiceListEntry extends Disposable { // 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. dom.on('keydown', stopPropagation), + dom.on('copy', stopPropagation), + dom.on('cut', stopPropagation), + dom.on('paste', stopPropagation), // On enter, focus on the input element. dom.onKeyDown({ Enter : focusOnNew