0
votes

When working with Ext.Net, after disabling the button it disappears from the DOM. It seems like a CSS or Javascript issue because the button is there and only after playing with the CSS properties for height and width will the button show again.

1

1 Answers

0
votes

If you iterate through the collection of buttons and change the css display property to block, it will fix the problem.

findButtonbyTextContent("text to find");

function findButtonbyTextContent(text) {
    var buttons = document.querySelectorAll('button');
    for (var i=0, l=buttons.length; i<l; i++) {
              if (buttons[i].firstChild.nodeValue == text){   
                    buttons[i].style.display = "block";
              }
    }  
}