ICEfaces
  1. ICEfaces
  2. ICE-2614

Incorrect dropValue returned by event.getTargetDropValue()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.8.1
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Using the attached test case, here are the steps used to reproduce the issue.

      1. Drag the red draggable square to the yellow div area.
      Console output will show:
      14:01:07,564 INFO [STDOUT] TestBean.dragListener: eventType=3, dropValue=0, dragValue=null

      2. Scroll yellow div down the bottom
      3. Drag the red draggable square to this new area of the yellow div.
      Console output will now show:
      14:01:13,911 INFO [STDOUT] TestBean.dragListener: eventType=3, dropValue=1, dragValue=null

      Notice that the drop values differ depending on where we drag the item to in the div.
      1. JIRA_2614_src.zip
        129 kB
        Tyler Johnson
      1. ScreenHunter_02 Apr. 30 16.28.jpg
        81 kB
      2. ScreenHunter_03.jpg
        72 kB
      3. ScreenHunter_04.jpg
        73 kB
      4. ScreenHunter_05.jpg
        71 kB
      5. ScreenHunter_06.jpg
        73 kB

        Activity

        Hide
        yip.ng added a comment -

        The patch works with the test case made for it. (See attached screenshot ScreenHunter_02 Apr. 30 16.28.jpg.) Yet it doesn't work with our test case.

        Show
        yip.ng added a comment - The patch works with the test case made for it. (See attached screenshot ScreenHunter_02 Apr. 30 16.28.jpg.) Yet it doesn't work with our test case.
        Hide
        yip.ng added a comment -

        The patch requires the id of the scrollable div, but even with the addition of the scroller id (hardcoded for now, may require addition of scroller id attribute later), it still doesn't work. Now if you scroll down to the bottom yellow div's to do the drag and drop, no event seems to happen at all. See screenshots ScreenHunter_03.jpg and ScreenHunter_04.jpg.

        Show
        yip.ng added a comment - The patch requires the id of the scrollable div, but even with the addition of the scroller id (hardcoded for now, may require addition of scroller id attribute later), it still doesn't work. Now if you scroll down to the bottom yellow div's to do the drag and drop, no event seems to happen at all. See screenshots ScreenHunter_03.jpg and ScreenHunter_04.jpg.
        Hide
        yip.ng added a comment -

        Seems we have introduced some bug(s) when overriding the Droppables.show() function in Scriptaculous. If we go back to the original Droppables.show() function (not involved in the patch), the event firing seems to work fine.

        Show
        yip.ng added a comment - Seems we have introduced some bug(s) when overriding the Droppables.show() function in Scriptaculous. If we go back to the original Droppables.show() function (not involved in the patch), the event firing seems to work fine.
        Hide
        yip.ng added a comment -

        Fixed our overriding show() function. This together with the patched isAffected() function from Scriptaculous fixed the issue. See screenshots ScreenHunter_05.jpg and ScreenHunter_06.jpg.

        The new isAffected() function needs to know the id of the scroller. It's been hardcoded so far.

        Next, we need to add a scroller id attribute and pass it to Scriptaculous.

        Show
        yip.ng added a comment - Fixed our overriding show() function. This together with the patched isAffected() function from Scriptaculous fixed the issue. See screenshots ScreenHunter_05.jpg and ScreenHunter_06.jpg. The new isAffected() function needs to know the id of the scroller. It's been hardcoded so far. Next, we need to add a scroller id attribute and pass it to Scriptaculous.
        Hide
        yip.ng added a comment -

        Done. Note that you need to use the new attribute (dropTargetScrollerId) for the fix to work:

        <div id="scrolling_div" ...>
        <ice:panelSeries ...>
        <ice:panelGroup dropTarget="true" dropTargetScrollerId="scrolling_div" ...>
        ...
        </ice:panelGroup>
        </ice:panelSeries>
        </div>

        Show
        yip.ng added a comment - Done. Note that you need to use the new attribute (dropTargetScrollerId) for the fix to work: <div id="scrolling_div" ...> <ice:panelSeries ...> <ice:panelGroup dropTarget="true" dropTargetScrollerId="scrolling_div" ...> ... </ice:panelGroup> </ice:panelSeries> </div>

          People

          • Assignee:
            yip.ng
            Reporter:
            Tyler Johnson
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: