[FIXED] [#1567] [4.6.0] CheckBox not visible after calling .hide() followed by .show()

  1. #1

    [FIXED] [#1567] [4.6.0] CheckBox not visible after calling .hide() followed by .show()

    Ext.Net version: 4.5.0

    Hello,

    When hiding and then showing a CheckBox, the label is displayed again but the checkbox itself isn't. We discovered this issue when upgrading from 4.4.0 to 4.5.0. This page demonstrates the issue:

    <%@ 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" Layout="auto">
                <Items>
                    <ext:Button runat="server" OnClientClick="#{TestBox}.hide();" Text="Hide" />
                    <ext:Button runat="server" OnClientClick="#{TestBox}.show();" Text="Show" />
                    <ext:Checkbox runat="server" ID="TestBox" FieldLabel="I am a checkbox" />
                </Items>
            </ext:Viewport>
        </form>
    </body>
    </html>
    First, click on the "Hide" button, and then on the "Show" button. The checkbox should be visible again, but it's not. This seems to happen in the method Ext.net.FieldNote.updateIndicators. As a workaround we have overriden the method to do nothing if the component is a checkbox (since we don't use indicators on checkboxes).

    Click image for larger version. 

Name:	issue.png 
Views:	46 
Size:	5.5 KB 
ID:	25062

    Best regards,
    Raphael
    Last edited by fabricio.murta; Jun 15, 2018 at 6:47 PM.
  2. #2
    Hello Raphael!

    Thanks for reporting the issue! I've checked it against Sencha's Ext JS 6.5.2 and this issue does not work there, so this is our fault somewhere, sorry!

    As for a quick workaround to it, just manually remove checkboxes' InnerWrapEl's display: none CSS property like this:

    <ext:Button runat="server" OnClientClick="#{TestBox}.show(); #{TestBox}.innerWrapEl.setStyle('display', undefined);" Text="Force Show" />
    This is a safe workaround and it shouldn't break your code even when the bug is effectively fixed within Ext.NET.

    We've logged this issue under #1567 and we'll post back here as soon as we have news about this issue status in Ext.NET.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hi Fabricio,

    We just upgrade Ext.Net from 4.1 to 4.5.1 and we have the same issue, is this still unresolved?

    Thanks
  4. #4
    Hello @Fahd!

    Yes, the issue is still open, unfortunately.
    Fabrício Murta
    Developer & Support Expert
  5. #5
    Hello again, @Fahd!

    We have just fixed this issue within our Ext.NET sources. The fix is immediately available for premium subscription users through Ext.NET sources from github, and will be publicly available next Ext.NET release (being it 4.6.0 by the time of the writing of this response).

    Thank you very much for reporting the issue!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Show Open/Save File Dialog box and hide Ext.Net Window
    By jtorkels in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 12, 2013, 3:45 PM
  2. [OPEN] [#296] Charts - Bar labels show/hide
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Jul 12, 2013, 4:40 AM
  3. Replies: 1
    Last Post: Jan 08, 2013, 4:00 AM
  4. Dynamically show/hide gridpanel header checkbox
    By chrisronaldo in forum 1.x Help
    Replies: 0
    Last Post: Oct 02, 2012, 9:43 AM
  5. Replies: 4
    Last Post: Dec 02, 2010, 1:44 PM

Posting Permissions