Skip to content

Fixed bug where delete key wasn't working in the text editor#2632

Merged
hecrj merged 1 commit intoiced-rs:masterfrom
leo030303:fix_delete_key_bug
Oct 14, 2024
Merged

Fixed bug where delete key wasn't working in the text editor#2632
hecrj merged 1 commit intoiced-rs:masterfrom
leo030303:fix_delete_key_bug

Conversation

@leo030303
Copy link
Contributor

@leo030303 leo030303 commented Oct 8, 2024

Fixes #2631.
When the delete key was pressed, it would only run the Delete binding if the content of the text editor was None. This was the source of the bug, I switched it to an is_some() check.

@hecrj hecrj added this to the 0.14 milestone Oct 14, 2024
@hecrj hecrj added bug Something isn't working widget fix labels Oct 14, 2024
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Your fix would have broken the delete key in the numpad. The proper fix is to actually match on the DELETE UTF-8 character code instead.

@hecrj hecrj enabled auto-merge October 14, 2024 19:09
@hecrj hecrj added the text label Oct 14, 2024
@hecrj hecrj merged commit c01ef5b into iced-rs:master Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fix text widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete key not working in text editor

2 participants