RichFaces
  1. RichFaces
  2. RF-1918

ModalPanel JavaScript errors when using autosized attribute

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 3.1.3
    • Fix Version/s: 3.1.4, 3.2.0
    • Component/s: None
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      RF 3.1.3.GA with MyFaces 1.2.0, Tomahawk 1.1.6 running in tomcat 6.0.14. under JDK 1.6 Update 3 on Windows XP
    • Similar Issues:
      Show 10 results 

      Description

      Opening a modal panel using the showWhenRendered option and autoSized = true - When I close the modal panel I get the following javascipt error tens and tens of times. This is the error as appears in firebug:

      "eContentDiv has no properties
      http://localhost:8090/myapp/faces/a4j_3_1_3-SNAPSHOTorg/richfaces/renderkit/html/scripts/modalPanel.js
      Line 89"

      Without autosize this error does not occur. The error doesn't seem to affect any functionality but slows down the app. The error occurs both in FireFox 2 and IE6. Is still an issue on today's 3.1.4 SNAPSHOT. I can't find any other reference to this error.

      http://jboss.com/index.html?module=bb&op=viewtopic&t=127341

        Activity

        Hide
        Carl Howarth
        added a comment -

        Just for info, I have done a workaround that works for me for the time being, though i'm sure there must be more to the fix than this:

        correctShadowSize: function(event) {
        var eContentDiv = $(this.contentDiv);
        var eShadowDiv = $(this.shadowDiv);
        var eIframe = $(this.iframe);

        if (eContentDiv != null) { //added null check to get around multiple JS errors.
        var cWidth = eContentDiv.clientWidth;
        var cHeight = eContentDiv.clientHeight;

        eShadowDiv.style.width = cWidth+"px";
        eShadowDiv.style.height = cHeight+"px";

        if (eIframe)

        { eIframe.style.width = cWidth+"px"; eIframe.style.height = cHeight+"px"; }

        }
        }

        Show
        Carl Howarth
        added a comment - Just for info, I have done a workaround that works for me for the time being, though i'm sure there must be more to the fix than this: correctShadowSize: function(event) { var eContentDiv = $(this.contentDiv); var eShadowDiv = $(this.shadowDiv); var eIframe = $(this.iframe); if (eContentDiv != null) { //added null check to get around multiple JS errors. var cWidth = eContentDiv.clientWidth; var cHeight = eContentDiv.clientHeight; eShadowDiv.style.width = cWidth+"px"; eShadowDiv.style.height = cHeight+"px"; if (eIframe) { eIframe.style.width = cWidth+"px"; eIframe.style.height = cHeight+"px"; } } }
        Hide
        Sergey Halipov
        added a comment -

        Committed revision 5434.

        Show
        Sergey Halipov
        added a comment - Committed revision 5434.
        Hide
        Jay Balunas
        added a comment -

        Part of a bulk update, all resolutions changed to done, please review history to original resolution type

        Show
        Jay Balunas
        added a comment - Part of a bulk update, all resolutions changed to done, please review history to original resolution type

          People

          • Assignee:
            Nick Belaevski
            Reporter:
            Carl Howarth
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: