Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-55965

With Nested Portlets inside Nested Portlets Drag and Drop Delegation listeners are not completely released

    Details

      Description

      Reproduction Steps:

      1. Start a Liferay bundle and log on as default admin
      2. Place a Nested Portlets portlet on the default page
      3. Place a Nested Portlets portlet inside the other Nester Portlets portlet
      4. Open the page without JavaScript minification (append "?js_fast_load=0" to the url)
      5. Start dragging the outer Nested Portlets portlet, so we're sure the Drag&Drop is correctly initialized
      5. Open the browser's Developer Tools (F12)
      6. Open the "Debugger" section
      7. Open the file dd-drag.js by choosing it from the file selector (the folder icon on the top left)
      8. Search for the first occurence of "_handleMouseDownEvent: function"
      9. Create a new breakpoint at the line that says "this.fire(EV_MOUSE_DOWN,

      { ev: ev }

      );"
      10. Edit the brekpoint's conditions by right-clicking the bullet on the left side of the line
      11. Add as the condition the following code: "console.log('dd-drag')", this will log to the console without stopping the execution of javascript
      12. Open the Developer Tools' "Console" section
      13. Click 5 times on the inner Nested Portlets portlet's body.

      Expected results:

      • Nothing is logged to the console
        This is the expected behaviour because the method "_handleMouseDownEvent" is detached by "Y.DD.Drag._unprep" which is called on "drag:mouseup" as set up in "Y.DD.Delegate.initializer".

      Actual results:

      • At the first click nothing is logged to the console
      • At the second click "dd-drag" is logged once
      • At the third click "dd-drag" is logged twice
      • At the fourth click "dd-drag" is logged three times
      • At the fifth click "dd-drag" is logged four times
        In total "dd-drag" is logged to the console 10 times.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 50 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M6