[OPEN] [#1825] setNote fails when no note is originally set

  1. #1

    [OPEN] [#1825] setNote fails when no note is originally set

    define a simple NumberField

                        <ext:NumberField ID="test"
    notice that there is NO Note attribute set.

    on page load, set a note on that NumberField via App.test.setNote('test')
    you will find a JS error because me.noteEl is null.

    setNote: function (t, encode) {
            var me = this,
            me.note = t;
            if (me.rendered) {
                oldHeight = me.noteEl.getHeight();
                me.noteEl.dom.innerHTML = encode !== false ? Ext.util.Format.htmlEncode(t) : t;
                if (me.noteEl.getHeight() !== oldHeight) {
    if i define the Note object on the NumberField in markup via
    then i can properly call App.test.setNote('new note')

    pls fix
  2. #2
    Hello Zev!

    I would advise you to use Note=" " on fields you want to be capable of receiving notes. For a few reasons:

    - it will render the note DOM structure up front
    - avoid potential "micro-delays" when first drawing a note to the field
    - avoid potential layout issues when the note DOM structure is first rendered

    But anybody would expect setNote to work when called even if no initial note is set to the field. So here it is: #1825.

    This has, in fact, been reintroduced by changes in Ext JS that were incompatible with the fix we already had in place. It looks like some memory optimization "optimized out" the ability to inject notes when they are not initially set.

    Thanks for taking your time to report the issue. We'll post back here as soon as we get it fixed!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 8
    Last Post: Feb 11, 2015, 8:55 PM
  2. Replies: 4
    Last Post: Oct 24, 2013, 3:54 PM
  3. Replies: 3
    Last Post: Jul 08, 2010, 8:48 PM
  4. BeforeEdit from server side and set note on editor
    By locoperoguapo in forum 1.x Help
    Replies: 0
    Last Post: Jul 20, 2009, 3:31 PM
  5. Replies: 3
    Last Post: Jul 14, 2009, 7:02 AM

Posting Permissions