ICEfaces
  1. ICEfaces
  2. ICE-9398

DOM clone/copy reduces adjacent TEXT nodes which causes unintended DOM differences, so javascript executes redundantly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA
    • Fix Version/s: EE-3.3.0.GA_P01, 4.0.BETA, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P1

      Description

      The framework core, compat and ACE components make multiple subsequent calls to ResponseWriter.write and ResponseWriter.writeText, to output fragments of javascript, which get rendered out as a single javascript call due to our framework concatenating them.

      Either from the DOM cloning or the FastInfoSet copying (definitely latter but possibly also former), we now have situations where the old DOM has a single TEXT node for javascript calls, while the new DOM has the multiple sibling TEXT nodes, so a DOM difference occurs. This can trigger HEAD updates, and at the very least, cause javascript to re-execute that we may have intended to not be executed beyond the first time it was rendered.

      Example of files affected that I have fixed in my workplan:

      M icefaces/compat/core/src/main/java/com/icesoft/faces/application/ExtrasSetup.java
      M icefaces/compat/core/src/main/java/com/icesoft/faces/context/CompatDOMPartialViewContext.java
      M icefaces/ace/component/src/org/icefaces/ace/component/selectmenu/SelectMenuRenderer.java
      M icefaces/ace/component/src/org/icefaces/ace/component/combobox/ComboBoxRenderer.java
      M icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetRenderer.java
      M icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryRenderer.java
      M icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
      M icefaces/core/src/main/java/org/icefaces/impl/component/NavigationNotifier.java
      M icefaces/core/src/main/java/org/icefaces/impl/context/DOMResponseWriter.java
      M icefaces/core/src/main/java/org/icefaces/impl/facelets/tag/icefaces/core/RefreshHandler.java
      M icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java

        Issue Links

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: