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

          Philip Breau created issue -
          Philip Breau made changes -
          Field Original Value New Value
          Salesforce Case []
          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. 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);
                                      }
                                  });
                              }
                          });
          Philip Breau made changes -
          Attachment component-showcase.war [ 12732 ]
          Arran Mccullough made changes -
          Link This issue is duplicated by ICE-6323 [ ICE-6323 ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 1.8.2-EE-GA_P03 [ 10251 ]
          Assignee Priority P1
          Assignee Mircea Toma [ mircea.toma ]
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Tyler Johnson made changes -
          Salesforce Case [5007000000F6PyF]
          Tyler Johnson made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Tyler Johnson made changes -
          Attachment sc9683.war [ 12810 ]
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Tyler Johnson made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Tyler Johnson made changes -
          Salesforce Case [5007000000F6PyF] [5007000000F6PyF, 5007000000FbpOO]
          Tyler Johnson made changes -
          Attachment sc9853.war [ 12908 ]
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Arran Mccullough made changes -
          Attachment Case9897Example2.war [ 12971 ]
          Attachment modal-popup-P02.JPG [ 12972 ]
          Attachment modal-popup-patch.JPG [ 12973 ]
          Arran Mccullough made changes -
          Salesforce Case [5007000000FbpOO, 5007000000F6PyF] [5007000000FbpOO, 5007000000F6PyF, 5007000000GAr3D]
          Arran Mccullough made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1

            People

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

              Dates

              • Created:
                Updated:
                Resolved: