The html bellow is loaded on a WebView.
In a specific moment, the javascript function toggleLayer() is called and changes the attribute 'display' of the internal div's to switch between 'expanded' and 'normal' layers.
This works fine until the Android KitKat, but in the Lollipop, the WebView doesn't update its content after the layer changing.
I believe that it occurs for some improvement in the new versions of the WebView, but I don't know exactly what is it.
This behaviour is know in Lolipop WebViews? How can I around it and to do the WebView updates itself when the content is changed?
<div id="adContainer" style="width:320px;margin:0px;padding:0px;background-color:#ffffff;">
<div id="normal" style="display:none;width:320px;height:50px;margin:auto;position:relative;top:0px;left:0px;">
<img width="320" height="50" src="http://admarvel.s3.amazonaws.com/demo/mraid/320x50_click_to_expand.png" onclick="javascript:expand();"/>
</div>
<div id="expanded" style="display:none;width:320px;height:250px;margin:auto;position:relative;top:0px;left:0px;">
<img width="320" height="250" style="position:absolute;top:0px;left:0px;" src="http://admarvel.s3.amazonaws.com/demo/mraid/320x250.png" />
<img width="37" height="37" style="position:absolute;top:125px;left:56px;" src="http://admarvel.s3.amazonaws.com/demo/mraid/Html_37x37.png" onclick="javascript:openSite('http://www.opera.com');" />
<img width="37" height="37" style="position:absolute;top:125px;left:113px;" src="http://admarvel.s3.amazonaws.com/demo/mraid/Location_37x37.png" onclick="javascript:openSite('https://maps.google.com/maps?q=1875+S+Grant+St,+San+Mateo,+CA&hl=en&sll=46.238212,6.864936&sspn=0.135592,0.222816&oq=1875+S&hnear=1875+S+Grant+St,+San+Mateo,+California+94402&t=m&z=17&iwloc=A')" />
<img width="37" height="37" style="position:absolute;top:125px;left:170px;" src="http://admarvel.s3.amazonaws.com/demo/mraid/Download_37x37.png" onclick="javascript:openSite('https://itunes.apple.com/us/app/opera-mini-web-browser/id363729560?mt=8&ign-mpt=uo%3D4');" />
<img width="37" height="37" style="position:absolute;top:125px;left:227px;" src="http://admarvel.s3.amazonaws.com/demo/mraid/Video_37x37.png" onclick="javascript:openSite('http://admarvel.s3.amazonaws.com/demo/mraid/OMW_SOUND_VIDEO_RENEW.iPhoneSmall.mp4');" />
</div>
<script language="javascript" type="text/javascript">
function toggleLayer( fromLayer, toLayer )
{
var fromElem, toElem, fromElemStyle, toElemStyle;
fromElem = document.getElementById( fromLayer );
fromElem.style.display = 'none';
toElem = document.getElementById( toLayer );
toElem.style.display = '';
}
</script>