Loading ...
Sorry, an error occurred while loading the content.

Re: Dialog on pages causes "ugly" load

Expand Messages
  • Satyen Desai
    Hi Saf, Which member of the container family are you seeing this on? I believe you mentioned Dialog, but I cannot seem to replicate the problem using it. Which
    Message 1 of 8 , Aug 1, 2007
    View Source
    • 0 Attachment
      Hi Saf,

      Which member of the container family are you seeing this on? I believe you mentioned Dialog, but I cannot seem to replicate the problem using it. Which version of YUI? Any particular browser?

      Using YUI 2.2.2, I do see the problem using Overlay with the following code. Overlay is displayed initially and fades out when the page is loads - I believe the "visible for a split second" you refer to. The rest of the container family seems to be fine (I did not test Tooltip).

              <div id="c">
                  <div class="hd">Container Header</div>
                  <div class="bd">Container Body</div>
                  <div class="ft">Container Footer</div>
              </div>

              <script type="text/javascript">
                  YAHOO.util.Event.onDOMReady(function() {
                      // Or Module, Panel, Dialog, SimpleDialog
                      var c = new YAHOO.widget.Overlay("c", {
                          visible:false,
                          // Set the fade duration high, just to easily see the problem
                          effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:3.00}
                      });
                      c.render();
                  });
              </script>

      This problem in Overlay has been fixed in 2.3.0, and can be worked around in 2.2.2 by changing the code to this:

              <div id="c">
                  <div class="hd">Container Header</div>
                  <div class="bd">Container Body</div>
                  <div class="ft">Container Footer</div>
              </div>

              <script type="text/javascript">
                  YAHOO.util.Event.onDOMReady(function() {
                      var c = new YAHOO.widget.Overlay("c", {
                          visible:false,
                      });
                      c.render();
                      c.cfg.setProperty("effect",{effect:YAHOO.widget.ContainerEffect.FADE,duration:3.00});
               });
              </script>

      Can you post some of your code, if you continue to have problems with this?

      Hope this helps,
      Satyen

      PS: Animation is not supported on non-numerical attributes (like display) hence you don't see the effect applied when you changed "visibility" to "display" in the patch you posted.
    Your message has been successfully submitted and would be delivered to recipients shortly.