ICEfaces
  1. ICEfaces
  2. ICE-6333

Links disabled after setting modal Popup to non-rendered

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-GA_P02
    • Fix Version/s: EE-1.8.2.GA_P03
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      n/a
    • Workaround Exists:
      Yes
    • Workaround Description:
      use the visible attribute instead of the rendered attribute

      Description

      When using a PanelPopup component, setting the rendered attribute from true to false causes all links on a page to become disabled. All links, even those outside of the rendered ICEfaces content, such as those in other portlets or a theme in a portal environment, become disabled. Only refreshing the page will re-enable the links. This seems to be due to some new Javascript code in style.js which 'deregisters' certain events on elements on the page when a modal overlay is activated. The events are 're-registered' when the modal overlay is deactivated, but this requires the PanelPopup to remain in the rendered state. If the popup is no longer rendered after the events are deregistered, they will not be reregisterd, even though the modal overlay is no longer active.

      The following code in style.js Ice.modal.start() is responsible for the event deregistration, so this bug probably also applies to the other elements and events listed there, namely, 'input', 'select', 'textarea' and 'button'.

      'input', 'select', 'textarea', 'button', 'a'].each(function(type) {
                      $enumerate(document.body.getElementsByTagName(type)).each(function(e) {
                          if (!childOfTarget(e)) {
                              var onkeypress = e.onkeypress;
                              var onkeyup = e.onkeyup;
                              var onkeydown = e.onkeydown;
                              var onclick = e.onclick;
                              e.onkeypress = none;
                              e.onkeyup = none;
                              e.onkeydown = none;
                              e.onclick = none;

                              rollbacks.push(function() {
                                  try {
                                      e.onkeypress = onkeypress;
                                      e.onkeyup = onkeyup;
                                      e.onkeydown = onkeydown;
                                      e.onclick = onclick;
                                  } catch (ex) {
                                      logger.error('failed to restore callbacks on ' + e, ex);
                                  }
                              });
                          }
                      });
      1. modal-popup-P02.JPG
        10 kB
      2. modal-popup-patch.JPG
        10 kB

        Issue Links

          Activity

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Philip Breau
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: