PDA

View Full Version : [CLOSED] modal window mask issue



SoftwareMHC
Aug 09, 2013, 11:30 PM
Hi,

I have 2 windows within the same form, the first window is visible by default, but the second window is hidden=true



<form id="someid" runat="server">
<ext:Window ID="window1" Icon="Table" Width="1000" Height="600" Cls="window" Border="true" Closable="false" Plain="false" Layout="BorderLayout" Resizable="false" Draggable="false">
<%-- with many components --%>
</ext:Window>
<ext:Window ID="window2" runat="server" Title="" Icon="NoteEdit" Height="850" Width="680" BodyStyle="" BodyPadding="5" Hidden="true" Closable="false" Modal="true">
<%-- a bunch of components here --%>
</ext:Window>
</form>


when I set "window2" visible with: window2.Show(); window2 shows up, but the mask covers both windows, however, if I separate both windows, each having its own form:



<form id="someid" runat="server">
<ext:Window ID="window1" Icon="Table" Width="1000" Height="600" Cls="window" Border="true" Closable="false" Plain="false" Layout="BorderLayout" Resizable="false" Draggable="false">
<%-- with many components --%>
</ext:Window>
</form>
<form id="form2">
<ext:Window ID="window2" runat="server" Title="" Icon="NoteEdit" Height="850" Width="680" BodyStyle="" BodyPadding="5" Hidden="true" Closable="false" Modal="true">
<%-- a bunch of components here --%>
</ext:Window>
</form>


then it works as I'd expect, the mask covering everything but the modal window.

Is this expected behavior or a bug?

Baidaly
Aug 10, 2013, 5:51 AM
Hello!

Sorry, I don't see any difference between two samples. However, all components should be inside the form tag with the runat="server" attribute.

6734

SoftwareMHC
Aug 12, 2013, 4:30 PM
Hello!

Sorry, I don't see any difference between two samples. However, all components should be inside the form tag with the runat="server" attribute.

6734

Yeah, without providing the actual code it would be difficult to reproduce.
I found this code so I'm masking the first window manually:



<Listeners>
<Show Handler="#{Window1}.mask();"></Show>
<Hide Handler="#{Window1}.unmask();"></Hide>
</Listeners>

Baidaly
Aug 12, 2013, 11:54 PM
I guess you misunderstood how to use mask method. This method puts a mask over this element to disable user interaction: http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.dom.Element-method-mask

If you still experience this problem please provide full test case to reproduce and your scenario.

SoftwareMHC
Aug 13, 2013, 4:29 PM
I guess you misunderstood how to use mask method. This method puts a mask over this element to disable user interaction: http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.dom.Element-method-mask

If you still experience this problem please provide full test case to reproduce and your scenario.

Thanks Baidaly,

Actually, I don't think we are understanding each other :)
I know what the mask method does, the point is that I had to resort to that method in order to mask the first window manually; this, because when I set window2 to modal and call Show on window2, the mask covers both windows, not everything underneath window2 (which is the expected result).

I'll prepare a test case later in the day.

cheers.

Baidaly
Aug 14, 2013, 3:15 AM
Yes, maybe a test case can clarify where is the problem. However, I recall we have one issue with modal mask, maybe it's your case: http://www.sencha.com/forum/showthread.php?268382