Can not close modal, because the modal wrapper is to big

Hello,

I am building a hybrid app and want to open a modal for registration and login. And by now everything works good,
but I can not always close the modal window by clicking on the overlay, because my window is much smaller, than the modal wrapper, so if the user clicks on the wrapper, nothing happens. How can I adjust the size of the wrapper class?

Here is a screenshot of what I mean:

Hope you guys could help me with this issue.

Cheers,

Andrej