Image Uploader Doesn’t Open Modal in Widget

After many hours of testing and exploring I finally found what causing the problem. If I add class to the button it’s working. But not any class, only class deo-btn.

So, this will work:

<input type="button" id="image-upload-button" class="deo-btn button button-primary" value="Add Image">

And this is not:

<input type="button" id="image-upload-button" class="button button-primary" value="Add Image">

Also, this will not work:

<input type="button" id="image-upload-button" class="just-button button button-primary" value="Add Image">

What is really weird that I’m still selecting button in JS using ID image-upload-button