Skip to main content
shovemedia
Participant
December 28, 2010
Question

Intermittent Missing Caret

  • December 28, 2010
  • 1 reply
  • 551 views

If I want an editable TLF field, no wordwrap, that is un-restricted in length, I have to set the ContainerController composition size width to NaN.

That works ok (well*...) but if I do this, the caret often goes missing at the beginning / end of the line.

To fix it, I searched the TLF source for selection scrollRect and subtracted one pixel from the x, and added two pixels to the width.

Can someone tell me whether this was a bad idea or not?

thanks,

:j

(* writing an editable field from scratch is a nightmare!)

This topic has been closed for replies.

1 reply

Adobe Employee
January 4, 2011

I don't think it will do any harm. Are you drawing a border around the text, using the content bounds, and finding that the caret intersects the border?

You may find it easier to add a llittle padding around the edge, by setting paddingLeft & paddingRight on the TextFlow or on the ContainerController.That will give you space for the border.

- robin

shovemedia
Participant
January 5, 2011

As I recall, I tried the padding trick and that did not work. No, no border.

There's a scrollRect being set that's one pixel too tight, but only when you set the ContainerController width to NaN

(The only way I found to allow unrestricted width and guarantee you won't get an unintended word wrap).

I wanted to bring it to the attention of the team as a possible bug (albeit a minor one).

:j

shovemedia
Participant
January 5, 2011

Edit: I was drawing my own mask (because I couldn't get horizontal scrolling to work to save my life -- another bug?),

but it was temporarily removed to make sure it was not the source of this problem (and it was not).