You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Shigeru Nakagaki <sh...@gmail.com> on 2014/04/14 04:23:41 UTC

about the issue FLEX-33423?

Hello

Could you please fix  issue FLEX-33423?
I reported this issue one year ago.
It still reproduces at Flex SDK 4.11.

I attached reproducible source.
And it is easy to reproduce.

Step 1. press [INSERT] key
Step 2. input [1234567]

The maxChars is 7, but you can input 8 characters.


thanks

Shigeru

Re: about the issue FLEX-33423?

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

I took a look but it's windows only issue so can't easily reproduce. Can someone on windows take a look thanks.

I can't see anywhere that the code checks for EditManager.overwriteMode so Im guessing the code to correctly support insert is missing??

Thanks,
Justin

Re: about the issue FLEX-33423?

Posted by piotrz <pi...@gmail.com>.
Hi,

@Justin I've checked this issue and it's occurs as Shigeru reported. 
As far as I understand the problem is in this comparision ->
controller.textLength <= range.absoluteEnd. I think solution could looks
like that controller.textLength - 1 <= range.absoluteEnd. 

absoluteEnd function returns position/index instead of textLength, in this
case maximum value of textLength (8) doesn't return the last index of typed
text. 

Please correct me if my understanding is wrong.

Piotr



-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-33423-tp36806p36833.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: about the issue FLEX-33423?

Posted by Alex Harui <ah...@adobe.com>.
Actually I did end up chasing it into TLF.  I'm going to check it in and
see what blows up.

-Alex

On 4/17/14 11:01 PM, "piotrz" <pi...@gmail.com> wrote:

>Sorry I didn't see your post about that is not TLF. It's ok.
>Thanks to this bug I've already run 8 (it's around 200 tests) tests
>classes.
>;)
>
>Thanks Alex.
>
>Piotr
>
>
>
>-----
>Apache Flex Committer
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-
>33423-tp36806p37022.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: about the issue FLEX-33423?

Posted by piotrz <pi...@gmail.com>.
Sorry I didn't see your post about that is not TLF. It's ok. 
Thanks to this bug I've already run 8 (it's around 200 tests) tests classes.
;)

Thanks Alex.

Piotr



-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-33423-tp36806p37022.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: about the issue FLEX-33423?

Posted by Alex Harui <ah...@adobe.com>.
I haven't pushed changes yet.

The changes are at the bottom of my previous post so you can try it
quickly if you have time.

-Alex

On 4/17/14 10:58 PM, "piotrz" <pi...@gmail.com> wrote:

>It took me much more time to run TLF tests related to this class than I
>thought, but they are ready.
>Alex did you push this changes to repo ? I can run tlf tests on your
>changes
>but on Monday.
>I have just started vacation here, so no access to my code. :)
>
>Piotr
>
>
>
>-----
>Apache Flex Committer
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-
>33423-tp36806p37021.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: about the issue FLEX-33423?

Posted by piotrz <pi...@gmail.com>.
It took me much more time to run TLF tests related to this class than I
thought, but they are ready.
Alex did you push this changes to repo ? I can run tlf tests on your changes
but on Monday.
I have just started vacation here, so no access to my code. :)

Piotr



-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-33423-tp36806p37021.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: about the issue FLEX-33423?

Posted by Alex Harui <ah...@adobe.com>.

On 4/17/14 3:52 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

>Hi,
>
>> I decided to take a quick look.  It appears that maxChars is enforced in
>> RichEditableText and not in TLF.
>It is enforced in this case it just allows a maximum of 8 not 7 as it
>should.
It looks to me that it knows that maxChars is 7, but the operation
incorrectly says it is deleting a character when it isn't (it is just
adding one).

I believe that you were on the right track, that adjustOversetForward
wasn't doing the right thing.

I've made the change posted below.  It seemed to fix the bug and 784
mustella tests ran cleanly.

-Alex

diff --git a/textLayout/src/flashx/textLayout/utils/NavigationUtil.as
b/textLayout/src/flashx/t
index 85b2014..2ebb985 100644
--- a/textLayout/src/flashx/textLayout/utils/NavigationUtil.as
+++ b/textLayout/src/flashx/textLayout/utils/NavigationUtil.as
@@ -1109,7 +1109,7 @@ package flashx.textLayout.utils
                        var flowComposer:IFlowComposer =
range.textFlow.flowComposer;
                        var controller:ContainerController = null;
                        checkCompose(flowComposer, range.absoluteEnd);
-                       if (range.absoluteEnd >
flowComposer.damageAbsoluteStart - 1)
+                       if (range.absoluteEnd >=
flowComposer.damageAbsoluteStart - 1)
                        {
                                clampToFit(range,
flowComposer.damageAbsoluteStart - 1);
                                return true;




Re: about the issue FLEX-33423?

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> I decided to take a quick look.  It appears that maxChars is enforced in
> RichEditableText and not in TLF.
It is enforced in this case it just allows a maximum of 8 not 7 as it should.

Justin

Re: about the issue FLEX-33423?

Posted by Alex Harui <ah...@adobe.com>.
Hi Piotr,

I decided to take a quick look.  It appears that maxChars is enforced in
RichEditableText and not in TLF.  I'm going to dig further unless you want
to do the digging.

Thanks,
-Alex

On 4/15/14 1:41 AM, "piotrz" <pi...@gmail.com> wrote:

>Thanks Alex. I will try to do this but no promise.
>
>Piotr
>
>
>
>-----
>Apache Flex Committer
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-
>33423-tp36806p36863.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: about the issue FLEX-33423?

Posted by piotrz <pi...@gmail.com>.
Thanks Alex. I will try to do this but no promise.

Piotr



-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-33423-tp36806p36863.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: about the issue FLEX-33423?

Posted by Alex Harui <ah...@adobe.com>.
Hi Piotr,

Thanks for looking into it.  I'm about to cut a 4.12.1 release candidate
so if you can get this in "soon" it can be released shortly.

Thanks,
-Alex

On 4/14/14 10:01 PM, "piotrz" <pi...@gmail.com> wrote:

>Hmm...And I forgot about case when textLength is 0. Because this issue is
>in
>TLF I will try to fix it. I'm working on TLF unit tests, so additionally
>will fix every test related to fixed function.
>
>Piotr
>
>
>
>-----
>Apache Flex Committer
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-
>33423-tp36806p36842.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: about the issue FLEX-33423?

Posted by piotrz <pi...@gmail.com>.
Hmm...And I forgot about case when textLength is 0. Because this issue is in
TLF I will try to fix it. I'm working on TLF unit tests, so additionally
will fix every test related to fixed function.

Piotr



-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/about-the-issue-FLEX-33423-tp36806p36842.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: about the issue FLEX-33423?

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

At a guess (as I can't reproduce) it looks like the issue may be in the adjustForOversetForward method of NavigationUtils. 

This looks a little suspect to me:

	if (controller.absoluteStart + controller.textLength <= range.absoluteEnd && controller.absoluteStart + controller.textLength != range.textFlow.textLength)
		controller = null;

In this case I think would be if (0+8 <= 7 && 0+8 != 8) == false when means control is not set to null, the method returns false and then calls moveForwardHelper.

	if (!controller)		// we're overset, or one position before overset
	{
		range.anchorPosition = range.textFlow.textLength;
		range.activePosition = range.anchorPosition;
		return true;
	}
	return false;

Hope that helps someone,
Justin