Hi Gary,
You can use (b) but you have to rewrite the code slightly. I added a
comment in jira. I verified it fixes the bug. When you update your
change to LzInputText.lzs, check it in.
Thanks!
Phil
On Wed, Nov 28, 2012 at 10:27 PM, gary.liu wrote:
Sorry, the way b will cause build error because that
JavaScriptEngine.java not allow to call private method
__updatefieldsize(); in
LzInputText.lzs. This is good mechanism, so we only have a.
Thanks.
gary.liu
From: gary.liu <mailto:[email protected]>
Date: 2012-11-29 10:59
To: Philip
Romanik <mailto:[email protected]>
CC: Amy Muntz <mailto:[email protected]> ; dju
<mailto:[email protected]> ; laszlo-dev
<mailto:[email protected]>
Subject: code review for bug lpp-10260
Hi Philip,
Now I start to work for OL bug. I will let you have a code review before
I
check in. Thanks.
For bug lpp-10260,
The reason is that the attribute
scroll and scrollheight of _newinternalinputtext(name is inp) in class
scrolledittext can not be updated when entering the text. But if
use code inp.setAttribute("text",
"ds\n\sd\ndf\nfgn\ndf\n\dfsd\n\ndfsd\nfsd"), the scrollbar will work
well.
Because that setAttribute("text",) will call method __updatefieldsize,
this method will update attribute scroll and scrollheight.
The resolution is call
__updatefieldsize to update attribute scroll and scrollheight when
ontext of inp or onchange of LzInputText.lzs. These two change code as
below.
a. add below code in line 127 under node
_newinternalinputtext of file incubator/scrolledittext.lzx
if ($dhtml) this.sprite.__updatefieldsize();
b. add below code in line 202 in function inputtextevent of file
lps/views/LzInputText.lzx
if (changed && $dhtml) this.isprite.__updatefieldsize();
The way a is a little change only effect class scrolledittext. But b
will
resolve all input scroll issue when input with attribute
scrollevents="true" multiline="true" .
Attachment is these two files. Please review and give me your
suggestion,
thanks.
Gary
gary.liu