Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19634

Live Data triggers JavaScript events on a detached DOM element

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 13.10.5
    • Fix Version/s: 14.4-rc-1, 13.10.6
    • Component/s: Live Data
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      As I commented on https://jira.xwiki.org/browse/XWIKI-19300?focusedCommentId=111095&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-111095 the Live Data is currently triggering a couple of JavaScript events but it does this on the DOM element that is replaced by the Vue.js component. So there's no easy way to catch these events:

      • that element is not anymore in the DOM, so the only way to get it if before the live data is loaded
      • the events can't propagate up in the DOM if the element is detached

      This shows that there is a serious flaw in the way the live data is loaded. We should:

      • either not replace the element (i.e. make it wrap the Vue.js component)
      • or trigger the events on the root element on the Vue.js component so that they can be listen to

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              MichaelHamann Michael Hamann
              Reporter:
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response: