==== customer issue ====
We have encountered a problem with copy and paste function in inputtext.
We used Ctrl-C to copy
and Ctrl-V to paste. We found that the copy and paste function in
"Firefox" it's not working 100% of the
time. For example, when we copy, even after "making sure" we did pressed
the Ctrl-C to copy, when
pasting, we might still pasted the text that we have copied previously.
(ie. the copy didn't take place)
The following is a sample that I've put together, it's basically just 2
inputtext. Load in in firefox. And just
start copy and pasting strings between the boxes. What I did is I copy
some text in the 1st input box and
paste it in the 2nd, then copy the 2nd one and paste it back to first, etc
etc. Just make sure you know
what you are copy and pasting and you should encounter something funcky
during the procress.
http://www.openlaszlo.org/lps/laszlo-explorer/editor.jsp?src=docs/guide/programs/laszlo_basics-$1.lzx
<canvas width="500" height="150" bgcolor="green">
<class name="mytext" width="150" height="20" bgcolor="gray">
<attribute name="text" type="text"/>
<inputtext resizable="false" text="${parent.text}" bgcolor="white"
x="1" y="1"
width="$once{parent.width-2}" height="$once{parent.height-2}"/>
</class>
<simplelayout axis="y"/>
<mytext>123</mytext>
<mytext>abc</mytext>
</canvas>
Any idea how we can go this fix?
<canvas width="500" height="150" bgcolor="green">
<class name="mytext" width="150" height="20" bgcolor="gray">
<attribute name="text" type="text"/>
<inputtext resizable="false" text="${parent.text}" bgcolor="white"
x="1" y="1"
width="$once{parent.width-2}" height="$once{parent.height-2}">
<handler name="onkeydown" args="k">
canvas.message.setText(k);
</handler>
</inputtext>
</class>
<simplelayout axis="y"/>
<text name="message"/>
<mytext>123</mytext>
<mytext>abc</mytext>
</canvas>