(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
pull/214/head
Jarosław Sadziński 2 years ago
parent d92a761f6e
commit 3b30c052bc

@ -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

Loading…
Cancel
Save