I am using modal= true
and appendToBody=true
in my Dialog, it works fine in Chrome and Firefox but not in IE8. The Dialog shows up, but if I close the Dialog the background is still blue, because of modal=true
, but I have to use this.
This is my code:
<ui:composition template="../templates/site.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:sec="http://www.springframework.org/security/tags">
<ui:define name="content">
<h:form id="form">
<p:commandButton value="Button" type="button" id="myButton"
onclick="form:testDialog.show()" />
<p:dialog id="testDialog" widgetVar="testDialog"
header="My Test Dialog" modal="true" appendToBody="true">
<h:form>
<p:fieldset legend="Dialog">
<p:spacer height="30" />
</p:fieldset>
</h:form>
</p:dialog>
</h:form>
</ui:define>
</ui:composition>
EDIT:
The problem was the naming of the dialog. The ID and widgetVar can not have the same name. Related to this post