Aug 29, 2018, 11:35 AM
[OPEN] [#1612] gh1567 override causes an exception if a checkbox is show()n before it's rendered
Ext.Net version: 4.7.1
Hello,
This is a follow-up to https://forums.ext.net/showthread.php?62155. We just upgraded to 4.7.1 to receive the official fix, but we discovered an issue.
If you have a hidden window with a checkbox, and you show() that checkbox before show()ing the window, an exception is thrown (and the window will remain hidden). Here's a repro:
The exception is thrown from the gh1567 override in the following line:
Best regards,
Raphael
Hello,
This is a follow-up to https://forums.ext.net/showthread.php?62155. We just upgraded to 4.7.1 to receive the official fix, but we discovered an issue.
If you have a hidden window with a checkbox, and you show() that checkbox before show()ing the window, an exception is thrown (and the window will remain hidden). Here's a repro:
<%@ Page Language="C#" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager runat="server" ScriptMode="Debug" />
<ext:Viewport runat="server">
<Items>
<ext:Window runat="server" ID="TestWindow" Hidden="true">
<Items>
<ext:Checkbox runat="server" ID="TestBox" FieldLabel="I am a checkbox" />
</Items>
</ext:Window>
<ext:Button runat="server" Text="Open window"
OnClientClick="#{TestBox}.setVisible('some condition' !== false); #{TestWindow}.show();"/>
</Items>
</ext:Viewport>
</form>
</body>
</html>
If you click the button you will get an Uncaught TypeError: Cannot read property 'setStyle' of undefined
.The exception is thrown from the gh1567 override in the following line:
me.innerWrapEl.setStyle('display', undefined);
me is the checkbox, and me.innerWrapEl is undefined (presumably because the checkbox hasn't been rendered yet).Best regards,
Raphael