flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mihai Chira <mihai.ch...@gmail.com>
Subject [jira] (FLEX-34756) How to know when the textFlow is damaged?
Date Thu, 19 Feb 2015 14:44:57 GMT
How can I see if a RichEditableText's textFlow is damaged?

>From my investigations, it seems that FlowComposerBase.isDamaged()
offers the perfect solution, but that it's then overridden in
StandardFlowComposer.isDamaged() to return true if the
RichEditableText allows scrolling. So if a text field allows scrolling
(even if it's not scrolled at the moment), the textFlow will ALWAYS
appear broken. How can this be useful?

(I need to know whether a textFlow is damaged because I want to fix
FLEX-34756[1] by preventing SpellUI from spell checking when the
textFlow is damaged - the assumption being that it will be recomposed
on the next frame. If you can think of a better solution, please let
me know.


[1] https://issues.apache.org/jira/browse/FLEX-34756
Summary of bug:
-squiggly is set to spell check when the focus returns to a text field
(see SpellUI.handleFocusIn())
-after making changes to the text, the RichEditableText's textFlow is
damaged and has to be recomposed. This normally happens in the next
frame, when RichEditableText.updateDisplayList calls
-BUT if we set focus on the RichEditableText after the text change,
squiggly does the spell checking on the damaged textFlow.
-because of this, it's offered bad indexes in
SpellUI.getValidFirstWordIndex() and SpellUI.getValidLastWordIndex(),
thus checking on non-existing text.

View raw message