Results 1 to 2 of 2

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

    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
      0  

    Default [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
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    132
      0  

    Default

    Fixed in SVN.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •