Author Topic: UIInput's caret incorrect position on longer sentences.  (Read 4493 times)

TJHeuvel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
UIInput's caret incorrect position on longer sentences.
« on: April 25, 2017, 08:43:47 AM »
https://streamable.com/feup5

See GIF, the more we type the more the carrot is incorrect. It goes too much to the right.

We just upgraded our project to the latest version 3.7.8, it seems like the geometry is just generated wrong.

TJHeuvel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: UIInput's caret incorrect position on longer sentences.
« Reply #1 on: April 26, 2017, 05:08:37 AM »
https://streamable.com/wh3tg
https://streamable.com/azrbz

Diving into `PrintCaretAndSelection` i've found our issue, the `finalSpacingX` value breaks things for us.

TJHeuvel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: UIInput's caret incorrect position on longer sentences.
« Reply #2 on: April 26, 2017, 05:13:57 AM »
The problem is the `spacing X` property of an UILabel.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput's caret incorrect position on longer sentences.
« Reply #3 on: April 26, 2017, 07:15:26 AM »
3.7.8 is a very old version. Did you mean upgraded from it, rather than to it? Seems to work fine in the latest.