Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text Editor inserts the character even on the command modifier #2138

Closed
2 tasks done
yczhangsjtu opened this issue Nov 13, 2023 · 1 comment · Fixed by #2169
Closed
2 tasks done

Text Editor inserts the character even on the command modifier #2138

yczhangsjtu opened this issue Nov 13, 2023 · 1 comment · Fixed by #2169
Labels
bug Something isn't working

Comments

@yczhangsjtu
Copy link

yczhangsjtu commented Nov 13, 2023

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

The Cmd+C and Cmd+V on text editor not only copy and paste, but additionally inserts the characters c and v to the editor.

Steps to reproduce:

  1. Run the editor example in this repository on a Macbook.
  2. Select some text in the text editor.
  3. Press Cmd+C

What is the expected behavior?

The text editor should not be affected.

Version

master

Operating System

macOS

Do you have any log output?

No response

@yczhangsjtu yczhangsjtu added the bug Something isn't working label Nov 13, 2023
@yczhangsjtu
Copy link
Author

This issue does not appear in TextInput, and I have looked into the code. It seems that TextInput maintains the key modifier in the state and checks if the modifier is set on receiving the CharacterReceived event. However, the TextEditor widget does not implement this. Maybe this is the reason that causes this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant