You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to understand the architecture of Iced I started implementing selecting text for the native TextInput.
When I wanted to implement copying to the clipboard I got irritated about what the purpose of is_pasting is as it seems to get cleared right after being set.
Does it have some purpose or can it be ignored / removed?
The text was updated successfully, but these errors were encountered:
Currently, it's used to ignore any received characters while a user keeps pasting text (for instance, if a user keeps Ctrl + V pressed for a while). However, I think we should just cancel the pasting completely in that case.
That said, text selection is tricky and may involve changing the State considerably. For instance, the scrolling offset of a TextInput is currently determined from the cursor position alone. However, most toolkits implement a stateful offset that only changes when the cursor is close to the edges of the clipping area. Text selection will force us to implement this and unify it somehow.
Additionally, if we are going to add text selection complexity it may be a good idea to have in mind a multi-line text input or TextArea and implement a general solution instead.
While trying to understand the architecture of Iced I started implementing selecting text for the native
TextInput
.When I wanted to implement copying to the clipboard I got irritated about what the purpose of
is_pasting
is as it seems to get cleared right after being set.Does it have some purpose or can it be ignored / removed?
The text was updated successfully, but these errors were encountered: