Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Sep 2008
    Location
    Salt Lake City
    Posts
    4
    Vote Rating
    0
    idajali is on a distinguished road

      0  

    Default [FIXED] Bug in Button.setText() clears icon image

    [FIXED] Bug in Button.setText() clears icon image


    When [re]setting the text on a Button via the setText() method, the icon image is cleared out (since setText() calls DOM.setInnerHtml() and the <img> tag is part of the innerHtml). To fix this, I found that adding the line:

    Code:
     setIcon(icon);
    in the method as follows corrects this problem:
    Code:
      public void setText(String text) {
        this.text = text;
        if (rendered) {
          if (text != null && text.equals("")) {
            text = "&nbsp;";
          }
          buttonEl.update(text);
          setIcon(icon);  // fixed bug with setText() clearing icon
          autoWidth();
        }
      }

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed in SVN.

Thread Participants: 1