ICEfaces
  1. ICEfaces
  2. ICE-7999

ace:dialog overlay remains on navigated page

    Details

    • Assignee Priority:
      P2

      Description

      When a modal ace:dialog is shown, and a commandButton does a non-redirect navigation to another view, then the modal overlay is not cleared up, and will block the new view. The dialog doesn't exist in the new view, so can't render a close/cleanup operation. And on decode the dialog was not being told to close, so there isn't an obvious hook there to do the close/cleanup either.

      We should investigate whether this can be fixed automatically by the component, or if not, what the application code needs to be to accomplish this.

        Activity

        Hide
        Mark Collette added a comment -

        It's not a redirect doing a GET, it's just a postback navigation that changes the server-side viewId while keeping the current browser page mostly intact.

        Show
        Mark Collette added a comment - It's not a redirect doing a GET, it's just a postback navigation that changes the server-side viewId while keeping the current browser page mostly intact.
        Hide
        Mircea Toma added a comment -

        I will need a test case that I can use to reproduce the issue. Exercising ace:dialog in 'showcase' (which now uses non-redirect navigation) shows me that the dialog is removed when navigating to a different demo.

        Show
        Mircea Toma added a comment - I will need a test case that I can use to reproduce the issue. Exercising ace:dialog in 'showcase' (which now uses non-redirect navigation) shows me that the dialog is removed when navigating to a different demo.
        Hide
        Mircea Toma added a comment -

        I used the attached test case to reproduce the described problem. In the test the ace:dialog component is present on the second page, thus rendered after the navigation occurred. Obviously that won't make the modal popup disappear.
        In conclusion this issue was a false alarm, most probably created after misinterpreting the test case behaviour.

        Show
        Mircea Toma added a comment - I used the attached test case to reproduce the described problem. In the test the ace:dialog component is present on the second page, thus rendered after the navigation occurred. Obviously that won't make the modal popup disappear. In conclusion this issue was a false alarm, most probably created after misinterpreting the test case behaviour.
        Hide
        Mircea Toma added a comment -

        Need button on the second page to navigate back in order to properly reproduce the issue.

        Show
        Mircea Toma added a comment - Need button on the second page to navigate back in order to properly reproduce the issue.
        Hide
        Deryk Sinotte added a comment -

        To replicate the problem:

        1) Navigate to the first page
        2) Click the button to trigger the action which navigates (non-redirect) to page 2
        3) On the second page, a popup appears. The test case may have a fileEntry component but this is not necessary to replicate the issue. You simply need a button on the popup which navigates back to page 1. The overlay provided by the modal dialog is still rendered.

        Show
        Deryk Sinotte added a comment - To replicate the problem: 1) Navigate to the first page 2) Click the button to trigger the action which navigates (non-redirect) to page 2 3) On the second page, a popup appears. The test case may have a fileEntry component but this is not necessary to replicate the issue. You simply need a button on the popup which navigates back to page 1. The overlay provided by the modal dialog is still rendered.
        Hide
        Mircea Toma added a comment -

        The jQuery modal dialog widget append its overlay to the document's body. So the update received after navigation will remove the element that corresponds to the dialog widget but not the overlay since the renderer was never aware of it.

        Show
        Mircea Toma added a comment - The jQuery modal dialog widget append its overlay to the document's body. So the update received after navigation will remove the element that corresponds to the dialog widget but not the overlay since the renderer was never aware of it.
        Hide
        Mircea Toma added a comment -

        The fix makes use of ice.onElementRemove function to register a callback that will close the dialog widget when the corresponding element cannot be found in the page anymore.

        Show
        Mircea Toma added a comment - The fix makes use of ice.onElementRemove function to register a callback that will close the dialog widget when the corresponding element cannot be found in the page anymore.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: