fix call to undefined function if button visible but no callback defined in html5