Skip to content

Comments

Desktop: Fixes #12763: skip copy event in TinyMCE if no content is selected.#13313

Merged
laurent22 merged 1 commit intolaurent22:devfrom
JZou-Code:fix_12763_empty_copy
Sep 30, 2025
Merged

Desktop: Fixes #12763: skip copy event in TinyMCE if no content is selected.#13313
laurent22 merged 1 commit intolaurent22:devfrom
JZou-Code:fix_12763_empty_copy

Conversation

@JZou-Code
Copy link
Contributor

What it does

This issue appears to occur only in the WYSIWYG (TinyMCE) editor.
In the Markdown editor, the default behavior is to copy the entire line when there is no selection, so no change is needed there.
I’ve limited the fix to TinyMCE: on copy, we first check whether there is a selection; if not, we do nothing.

How to test

Manual testing: before the change, the issue is reproducible; after the change, the behavior matches expectations—empty (no-selection) copies have no effect.

Test gif

Before:

Before

After:

After

Related issues

Fixes #12763

@JZou-Code
Copy link
Contributor Author

The GIF shows TinyMCE’s default behavior: when nothing is selected, pressing Ctrl+C does nothing. Non-code editors like Word or Notepad behave the same way, so maybe that’s just the more common way WYSIWYG gets implemented?

Default

@laurent22 laurent22 merged commit affebed into laurent22:dev Sep 30, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CTRL + C clears clipboard or copies current line without selection

2 participants