Ionic 4 Modal using Javascript

I copied the code in your documentation in the tab Javascript.

Then I added a button to present the modal:
<button onclick="presentModal()">Modal</button>
When I click in the button the modal is added, however it is not being displayed.
My guess is that there is something wrong with the method present in modalElement.present() that is not displaying the modal.
I added the following jquery code $('ion-modal').css('display', 'flex'); and now the modal is displayed.

My suggestion is that you review the method present() in javascript for ‘ion-modal’ elements, and that you also add a button in the example in your documentation with the action to present the modal when you click on it.