Runestone icon indicating copy to clipboard operation
Runestone copied to clipboard

Pointer / Cursor flicker with Catalyst

Open mmackh opened this issue 2 years ago • 3 comments

What happened?

https://user-images.githubusercontent.com/948693/210460651-d26ecad4-9ec0-45c1-8868-6fa04a3382df.mov

The courser flickers on Catalyst when changing lines. I think this is related to UITextInput / yPos, height of frame. Also highlighting is rather slow (almost looks like there is an animation + delay).

What are the steps to reproduce?

  • Populate TextView
  • Move between the lines
  • Observe mouse change between standard cursor and caret

What is the expected behavior?

No flicker. Would be happy to fix.

mmackh avatar Jan 03 '23 23:01 mmackh

Thanks for reporting this. Both points are great.

It seems that the cursor changes from the text beam to the regular cursor when in between two lines. I'm unsure why this happens but it could be that one of the functions in the UITextInput conformance does not return exactly what UIKit expects when running under Catalyst.

You're right that the animation that occurs during selection seems alien on a Mac. Runestone isn't explicitly adding an animation. UIKit adds this animation. I'm unsure how we can disable it.

I don't have much time right now to look into these two issues but I agree that they should be addressed to make Runestone feel more natural when running on the Mac.

simonbs avatar Jan 05 '23 10:01 simonbs

Will try working on resolving these points and things I discover along the way. I'm building an IDE on Catalyst internally and your framework is the only native viable option without starting from scratch. Thank you!

mmackh avatar Jan 05 '23 15:01 mmackh

Will try working on resolving these points and things I discover along the way.

Thanks! Let me know if I can be of assistance.

simonbs avatar Jan 05 '23 15:01 simonbs