Solved issue of modal dialog open wrongly on small screens (ie mobile devices)