PDA

View Full Version : modaldialog bug?


jdmoreira
05-17-2005, 02:28 AM
Hello.

We have detect what it seems to be a bug in modaldialog behaviour.

If you execute this code



<canvas height="300">
<simplelayout axis="x" spacing="20"/>
<modaldialog name="mydialog" width="300" height="200">
<text>Are you really sure you want to do something?</text>
<view align="right" layout="axis:x; spacing:20">
<button onclick="parent.parent.close()">Cancel</button>
<button onclick="parent.parent.close()" isdefault="true">OK</button>
</view>
<simplelayout spacing="5"/>
</modaldialog>

<button onclick="canvas.mydialog.open()">Open Dialog</button>
<edittext text="1234"></edittext>
<inputtext text="texto"></inputtext>
</canvas>


It is a simple variation of the one included in the modaldialog reference, and when you execute it and click on the button, you can see the modal window, but you can also access to the edittext and the inputtext.

Is this a bug?
Any trick to solve this problem?

Thanks.

kbriggs
05-10-2007, 12:08 PM
I see this thread was started 2 years ago. I just noticed this bug today in OL 3.3.3. It applies also to the Alert dialog since it's based on the modaldialog of course. Has this been fixed in the newer builds?


<canvas>
<simplelayout axis="y"/>
<alert id="atest">Alert Test</alert>
<modaldialog id="mtest" width="300" height="200">
<text>ModalDialog Test</text>
<view align="right" layout="axis:x; spacing:20">
<button onclick="parent.parent.close()">Cancel</button>
<button onclick="parent.parent.close()" isdefault="true">OK</button>
</view>
<simplelayout spacing="5"/>
</modaldialog>
<edittext>Edit me</edittext>
<button>alert test
<handler name="onclick">
atest.open();
</handler>
</button>
<button>modaldialog test
<handler name="onclick">
mtest.open();
</handler>
</button>
</canvas>

jamesej
05-13-2007, 01:32 PM
Have a look at this thread, a patch is listed apparently its a bug in LzText to do with when its selectable:

http://forum.openlaszlo.org/showthread.php?t=9252