Skip to content

Add .id method to text_editor to make it focusable programmatically#2653

Merged
hecrj merged 2 commits intoiced-rs:masterfrom
sgued:text-editor-id
Nov 15, 2025
Merged

Add .id method to text_editor to make it focusable programmatically#2653
hecrj merged 2 commits intoiced-rs:masterfrom
sgued:text-editor-id

Conversation

@sgued
Copy link
Contributor

@sgued sgued commented Oct 29, 2024

This functionality adds the ability to programmatically focus a text_editor widget.

  • Implemented following the focus handling of the text_input widget.
  • Updated an example to make use of the feature

@kiilerix
Copy link

This seems to be contributing to existing unnecessary code duplication. I'm exploring some cleanup in #2745 .

@IanTerzo
Copy link

Just merge this already. We need to be able to focus a text editor.

@Zane-XY
Copy link

Zane-XY commented Jul 21, 2025

@hecrj
Please merge this, we need the ability to focus the text_editor, can't implement autocompletion for text editor without this.

@airstrike
Copy link
Contributor

@hecrj Please merge this, we need the ability to focus the text_editor, can't implement autocompletion for text editor without this.

Why can't you just copy and paste the text editor into your own app and implement this yourself if you're in a hurry to use this solution?

@Zane-XY
Copy link

Zane-XY commented Jul 23, 2025

@airstrike I tried to copy the text_editor.rs into the project and it depends on some private modules, I don't want to end up to copy too many files to my project.

@janTatesa
Copy link
Contributor

Is there any problem with merging this?

@sgued
Copy link
Contributor Author

sgued commented Oct 28, 2025

I don't think there is much gained by commenting on this PR. Unless you have something to add please just put a 👍 on the top comment, I don't think more comments will help, let's not spam maintainers.

@sgued sgued force-pushed the text-editor-id branch 2 times, most recently from ea8c1e5 to 5a21f0e Compare October 28, 2025 17:17
@sgued sgued changed the title Add .id method and text_editor::focus task Add .id method to text_editor to make it focusable programmatically Nov 12, 2025
@hecrj hecrj added this to the 0.14 milestone Nov 15, 2025
@hecrj hecrj added feature New feature or request text widget addition labels Nov 15, 2025
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!

About time we merge this.

@hecrj hecrj enabled auto-merge November 15, 2025 21:48
@hecrj hecrj merged commit 645643b into iced-rs:master Nov 15, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants