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: Selecting Text not reliable #2705

Open
4 tasks done
StefanoD opened this issue Dec 22, 2024 · 0 comments
Open
4 tasks done

Text Editor: Selecting Text not reliable #2705

StefanoD opened this issue Dec 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@StefanoD
Copy link

StefanoD commented Dec 22, 2024

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

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?

I tried the text-editor example from your repository and when I am selecting text with a double-click, the text is sometimes not selected.

What is the expected behavior?

The text should be reliable selected with a double-click. I don't have this problem with other macOS applications.

Version

crates.io release

Operating System

macOS

Do you have any log output?

iced 0.13.1

On success, following events are generated:

- Edit(Click(Point{ coordinates }))
- Edit(Drag(Point{ coordinates }))
- Edit(SelectWord)

If it was not successful, following events are generated:

- Edit(Click(Point{ coordinates }))
- Edit(Drag(Point{ coordinates }))
- Edit(Click(Point{ coordinates }))
- Edit(Drag(Point{ coordinates }))

My suspicion is, that the point coordinates might slightly differ, if the selection was not successful, because sometimes, it is visible on the log output, that the coordinates slightly differ. But sometimes the coordinates in the output are identical and the selection still doesn't work. In the latter case, my suspicion is, that the point coordinates get truncated in the output and in reality the coordinates actually differ.
I think the solution is, to have some tolerance for coordinates, in order to be able to reliable selecting text with a double click.

@StefanoD StefanoD added the bug Something isn't working label Dec 22, 2024
@StefanoD StefanoD changed the title Text Editor: Selecting not reliable Text Editor: Selecting Text not reliable Dec 22, 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
Projects
None yet
Development

No branches or pull requests

1 participant