Skip to main content
Participant
February 2, 2011
Question

Strange behavior with getCommonCharacterFormat and links

  • February 2, 2011
  • 1 reply
  • 547 views

I am working on a texteditor using TLF and Flash CS5. The problem I have is that when I use getCommonCharacterFormat on a single point selection the behavior is different if I have a link-tag adjacent to the selection compared to not having it.

Think of a text like this: "Hello beautiful world!"

- When I place the cursor at the end of the text in bold the format says bold and when i continue to write the text will be in bold.

- When I place the cursor just before the text in bold the format says not bold and when i continue to write the text will not be in bold.

This makes perfectly sence to me and is exactly what I would expect to happen.

But if I make the word "beautiful" into a link the behavior is very different.

- When I place the cursor at the end of the text in bold the format says not bold but when i continue to write the text will be in bold.

- When I place the cursor just before the text in bold the format says bold but when i continue to write the text will not be in bold.

Is this a bug or is there a good explanation to this behaviour? Should I do want I want to do in a different way?
I you want me to I can paste some example code that illustrates my problem.
/Peter

This topic has been closed for replies.

1 reply

Adobe Employee
February 3, 2011

Sounds like a bug. The issue, for what it's worth, is that typing after a link is different than typing after a span, because new text that you type isn't added to the link. We'll investigate.

- robin

pruddephuAuthor
Participant
February 4, 2011

Thank you for your quick reply.

Peter