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
The following screen capture shows the issue. This is using a PlainEditor and drawing the selection/caret as in the vello_editor example. Note that there is initially no caret even though the input is focssed. The caret shows once some text has been typed in the field and disappears again when the text is deleted.
Screen.Recording.2024-10-10.at.22.32.02.mov
The text was updated successfully, but these errors were encountered:
This is actually because the layout is empty therefore we don’t do any font selection and have no metrics from which to generate cursor geometry. My upcoming code has a hack to address this by forcing layout of a single space (which used to be there but was removed at some point). There’s definitely a better way to do this but I plan to defer that to the larger refactor.
Ah yes, I removed that in #67 because, well, it seemed like a hack (and improvements in #67 meant that it would no longer panic when the string was empty). I guess the space hack will work but we'll need to keep track that we're in that "mode" so that we don't allow the space to be selected, etc.
There is actually another "mode" that I want which could probably work similarly: placeholder text. Which I am imagining working by having a second text string and set of styles that would be used as a fallback when the main string is empty.
The following screen capture shows the issue. This is using a
PlainEditor
and drawing the selection/caret as in the vello_editor example. Note that there is initially no caret even though the input is focssed. The caret shows once some text has been typed in the field and disappears again when the text is deleted.Screen.Recording.2024-10-10.at.22.32.02.mov
The text was updated successfully, but these errors were encountered: