Author: maksimkaszynski
Date: 2007-09-28 10:55:01 -0400 (Fri, 28 Sep 2007)
New Revision: 3165
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
http://jira.jboss.com/jira/browse/RF-975
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
---
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-09-28
12:25:33 UTC (rev 3164)
+++
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-09-28
14:55:01 UTC (rev 3165)
@@ -938,12 +938,35 @@
}
Richfaces.showModalPanel = function (id, opts) {
+
+ var invoke =
+ ("MSIE" == RichFaces.navigatorType()) ?
+ function(f) {
+ if (document.readyState != "complete") {
+ var args = arguments;
+ var dis = this;
+ window.setTimeout(
+ function() {
+ args.callee.apply(dis,args );
+ }, 50);
+ } else {
+ f();
+ }
+ } :
+ function(f) {
+ f();
+ };
+
var panel = $(id);
if (!panel) {
panel = Richfaces.findModalPanel(id);
}
- panel.modalPanel.show(opts);
-}
+ invoke(function() {
+ panel.modalPanel.show(opts);
+ });
+
+
+};
Richfaces.hideModalPanel = function (id, opts) {
var panel = $(id);
@@ -951,4 +974,4 @@
panel = Richfaces.findModalPanel(id);
}
panel.modalPanel.hide(opts);
-}
+};