Hi Guys,

I've noticed some annoying behaviour in the RadioButton class which is 
probably OK in 90% of cases, and hence has not been discussed (as far as I 
could see).

In the _applyValue method:

    // property apply
    _applyValue : function(value, old)
    {
      value ?
        this.addState("checked") :
        this.removeState("checked");

      if (value && this.getFocusable()) {
        this.focus();
      }
    },

The radio button will steal focus if the value is set to true and the 
instance is focusable. The issue I'm having is when setting the state of a 
form in response to some external stimulus, (e.g. synchronizing the state 
of a form with a different model by iterating over the fields and setting 
values) The focus always ends on the last radio button on the form, and if 
the form is in a scroll pane, the pane ends up scrolled down to show the 
last radio button set as it is focused.

I have extended the RadioButton class locally and removed the if statement 
from the _applyValue method, and the RadioButton's behaviour doesn't seem 
to be degraded in any way. I'm sure there is a reason why this code is in 
there, can anyone explain it? If there's no reason for it being there or 
the code has become redundant due to a later change, it'd be great for it 
to be removed in the next version?

Thanks as always,

Nick Tindall
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to