[FIXED] [#1621] [4.8.0] setNote JS function broken

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [FIXED] [#1621] [4.8.0] setNote JS function broken

    Support,

    see simple example. before alert fires. after alert does not since we have JS error in ext.

    thanks,
    /Z.

    <%@ Language="C#"  %>
    
    
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    
    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Test</title>
    
    
    </head>
    
    
    <ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" />
    
    
    <body>
        <form runat="server" onsubmit="return false;">
            <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Neptune">
                <Listeners>
                    <DocumentReady Handler="alert('before');App.test.setNote('test');alert('after');" />
                </Listeners>
            </ext:ResourceManager>
    
    
            <ext:Viewport ID="ViewPortMain" runat="server" Layout="BorderLayout">
                <Items>
    
    
    
    
                    <ext:DateField ID="test" runat="server" Text="blah" />
    
    
                </Items>
            </ext:Viewport>
    
    
        </form>
    </body>
    </html>
    Last edited by fabricio.murta; Feb 17, 2019 at 5:17 PM.
  2. #2
    Hello @Z!

    Thanks for raising this up! The method is really broken. It should be instantiating the note's DOM elements when called to a field without an initially set note.

    We've created github issue #1621 to track & fix this defect; we'll post back here when we have it fixed.

    As a quick way to fix this, what you can do is, make a blank field note at define time (add Note="&nbsp;" for instance, to the field), so that when the method is called, it does work.

    Notice that setting a field note with any text would allocate space for the field, so you should notice extra padding below the field; this may be undesirable, but it allows the whole form not to "jump around" when a note is set/changed to a field. Hiding the note (App.test.hideNote()) doesn't wipe the allocated space below the field.

    In case the extra allocated space is not wanted, you can set the note with just a whitespace (Note=" "). This won't allocate the space, but setting the note may overlap with content right below the field note, so you should test which approach works best for you.

    This issue has already been raised in the past, but I believe it would deserve being logged as an improvement now, as it has affected more people in the past. Here's one thread covering the subject: Error setting Checkbox Note property.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello again, @Z!

    We've fixed the issue, not only it will display correctly when you call setNote(), but also when you hide/show the note as well. The fix will make it to version 4.8.0.

    Thanks again for reporting the issue!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] TextField clearValue function broken
    By Z in forum 4.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 08, 2019, 1:47 PM
  2. Replies: 1
    Last Post: Nov 28, 2012, 2:46 AM
  3. [FIXED] [V0.7] ViewState Broken
    By Timothy in forum Bugs
    Replies: 1
    Last Post: Nov 17, 2008, 9:40 AM
  4. Replies: 6
    Last Post: Aug 25, 2008, 4:25 PM
  5. Replies: 4
    Last Post: Jul 05, 2008, 2:14 AM

Posting Permissions