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

Live Data triggers JavaScript events on a detached DOM element

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 14.4-rc-1, 13.10.6
    • 13.10.5
    • Live Data
    • None
    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    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

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

              Dates

                Created:
                Updated:
                Resolved: