Dialog is not showing in Safari
I am trying to show a modal dialog over a Google Map. The code below is working fine in IE,Firefox,Chrome. Using Safari on an iPad the page is grayed out, but dialog does not show up.
After some investigation I found out that if I edit jquery.ui.button.css and comment out the "display: block;" part, the dialog show up in Safari too.
.ui-button .ui-button-text {
/*
display: block; */
line-height: normal;
}
Any input on how to solve this would be most appreciated.
Full webpage:
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
- <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
- <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
- <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
- <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
- <script>
- var map;
- function sayHello() {
- var dialogOpts = {
- modal : true,
- autoOpen : false
- };
- $("#infoDialog2").dialog(dialogOpts);
- $("#infoDialog2").text("Hello");
- $("#infoDialog2").dialog("open");
- }
- $(function() {
- var myLatlng = new google.maps.LatLng(-34.397, 150.644);
- var mapOptions = {
- zoom : 12,
- mapTypeId : google.maps.MapTypeId.HYBRID
- };
- map = new google.maps.Map(document.getElementById('map_canvas'),mapOptions);
- map.setCenter(myLatlng);
- });
- </script>
- </head>
- <body>
- <div id="map_canvas" style="width: 600px; height: 400px;"></div>
- <div id="infoDialog2" title="Info"></div>
- <button onclick="sayHello()"/>Click Me!</button>
- </body>
- </html>