From cae37f3796a80e67c1d7f7b9110a643928224014 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 16 Jan 2012 12:53:36 +0000 Subject: fix iOS JS validation display issues ( fixes #187) --- web/js/map-OpenLayers.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'web/js/map-OpenLayers.js') diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index d0b712618..fa93c2f4c 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -362,6 +362,13 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { } }); $('#side-form').show(); + /* For some reason on IOS5 if you use the jQuery show method it + * doesn't display the JS validation error messages unless you do this + * or you cause a screen redraw by changing the phone orientation. + * NB: This has to happen after the call to show() */ + if ( navigator.userAgent.match(/like Mac OS X/i)) { + document.getElementById('side-form').style.display = 'block'; + } $('#side').hide(); $('#sub_map_links').hide(); fixmystreet.page = 'new'; -- cgit v1.2.3