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

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Support Case References https://www.icesoft.ca:4443/supportilla/show_bug.cgi?id=4527
        Hide
        Tyler Johnson added a comment -

        Application created with MyEclipse and tested on Jboss 4.2.0.

        Show
        Tyler Johnson added a comment - Application created with MyEclipse and tested on Jboss 4.2.0.
        Tyler Johnson made changes -
        Attachment accenture.war [ 10773 ]
        Tyler Johnson made changes -
        Assignee Adnan Durrani [ adnan.durrani ]
        Ken Fyten made changes -
        Attachment accenture.war [ 10773 ]
        Tyler Johnson made changes -
        Attachment JIRA_2614.war [ 10774 ]
        Ken Fyten made changes -
        Fix Version/s 1.7 [ 10080 ]
        Ken Fyten made changes -
        Assignee Adnan Durrani [ adnan.durrani ] Ted Goddard [ ted.goddard ]
        Hide
        Ted Goddard added a comment -

        To make the test case clearer, I adjusted the style as follows:

        <ice:panelGroup dropTarget="true" dropValue="#

        {bean.id}

        "
        style="background:yellow;height:100px;width:100px;border:2px; border-style:dotted; border-color:black">

        The source of the bug lies with Drag and Drop collision detection in the browser. It can be observed that if the red div is dropped outside the scrollable region where the yellow div is clipped, the drop event will still occur.

        Show
        Ted Goddard added a comment - To make the test case clearer, I adjusted the style as follows: <ice:panelGroup dropTarget="true" dropValue="# {bean.id} " style="background:yellow;height:100px;width:100px;border:2px; border-style:dotted; border-color:black"> The source of the bug lies with Drag and Drop collision detection in the browser. It can be observed that if the red div is dropped outside the scrollable region where the yellow div is clipped, the drop event will still occur.
        Hide
        Ted Goddard added a comment -

        This is also worth looking at after 1.7beta if other Drag and Drop JavaScript changes are being considered.

        Show
        Ted Goddard added a comment - This is also worth looking at after 1.7beta if other Drag and Drop JavaScript changes are being considered.
        Ted Goddard made changes -
        Assignee Ted Goddard [ ted.goddard ] Mircea Toma [ mircea.toma ]
        Ken Fyten made changes -
        Assignee Priority P2
        Mircea Toma made changes -
        Ken Fyten made changes -
        Fix Version/s 1.7.1 [ 10122 ]
        Fix Version/s 1.7 [ 10080 ]
        Assignee Priority P2
        Hide
        Tyler Johnson added a comment -

        Source code for test case

        Show
        Tyler Johnson added a comment - Source code for test case
        Tyler Johnson made changes -
        Attachment JIRA_2614_src.zip [ 10854 ]
        Hide
        Ken Fyten added a comment -

        This should be fixed in RC1, please retest.

        Show
        Ken Fyten added a comment - This should be fixed in RC1, please retest.
        Ken Fyten made changes -
        Assignee Priority P2
        Assignee Mircea Toma [ mircea.toma ] Sam Xiao [ sam.xiao ]
        Hide
        Sam Xiao added a comment -

        problem still presents in RC1

        Show
        Sam Xiao added a comment - problem still presents in RC1
        Sam Xiao made changes -
        Attachment JIRA_2614.war [ 11039 ]
        Hide
        Sam Xiao added a comment -

        problem still presents in latest 1.7 branch

        Show
        Sam Xiao added a comment - problem still presents in latest 1.7 branch
        Ken Fyten made changes -
        Fix Version/s 1.7.2 [ 10130 ]
        Fix Version/s 1.7.1 [ 10122 ]
        Ken Fyten made changes -
        Fix Version/s 1.8DR#2 [ 10142 ]
        Fix Version/s 1.7.2 [ 10130 ]
        Ken Fyten made changes -
        Fix Version/s 1.8DR#3 [ 10143 ]
        Fix Version/s 1.8DR#2 [ 10142 ]
        Ken Fyten made changes -
        Assignee Priority P2
        Ken Fyten made changes -
        Fix Version/s 1.8DR#3 [ 10143 ]
        Assignee Sam Xiao [ sam.xiao ]
        Joel Krebs made changes -
        Salesforce Case [50070000008IzLo]
        Joel Krebs made changes -
        Salesforce Case [50070000008IzLo] [50070000008JXMU]
        Ken Fyten made changes -
        Assignee Priority P3
        Assignee Arturo Zambrano [ artzambrano ]
        Hide
        Arturo Zambrano added a comment -

        This issue has been fixed in version 1.8.2 of Scriptaculous:
        https://prototype.lighthouseapp.com/projects/8887/tickets/59-drag-drop-problem-in-scroll-div

        A patch is also available. The fix is mainly in Droppables.isAffected().

        Show
        Arturo Zambrano added a comment - This issue has been fixed in version 1.8.2 of Scriptaculous: https://prototype.lighthouseapp.com/projects/8887/tickets/59-drag-drop-problem-in-scroll-div A patch is also available. The fix is mainly in Droppables.isAffected().
        Ken Fyten made changes -
        Fix Version/s 1.8.1 [ 10170 ]
        Ken Fyten made changes -
        Assignee Arturo Zambrano [ artzambrano ] Yip Ng [ yip.ng ]
        Hide
        yip.ng added a comment -

        Replaced Droppables.isAffected() with 1.8.2 version. Didn't work. Did a diff. There is no change at all from our version.

        Show
        yip.ng added a comment - Replaced Droppables.isAffected() with 1.8.2 version. Didn't work. Did a diff. There is no change at all from our version.
        Hide
        yip.ng added a comment -

        Applied patch as provided by Thomas Fuchs (author of Scriptaculous). Still doesn't work.

        Show
        yip.ng added a comment - Applied patch as provided by Thomas Fuchs (author of Scriptaculous). Still doesn't work.
        yip.ng made changes -
        Attachment ScreenHunter_02 Apr. 30 16.28.jpg [ 11699 ]
        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.
        yip.ng made changes -
        Attachment ScreenHunter_03.jpg [ 11700 ]
        Attachment ScreenHunter_04.jpg [ 11701 ]
        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.
        yip.ng made changes -
        Attachment ScreenHunter_05.jpg [ 11708 ]
        Attachment ScreenHunter_06.jpg [ 11709 ]
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18841 Wed May 06 13:13:26 MDT 2009 yip.ng ICE-2614
        Fixed wrong drag and drop positions when dropping onto targets in scrollable div.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/GroupRenderer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/effects/DragDrop.java
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/HtmlPanelGroup.java
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/scriptaculous/dragdrop.js
        Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/ice_properties/ice-panelGroup-props.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/droppable_ext.js
        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>
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19945 Thu Dec 10 14:36:52 MST 2009 judy.guglielmin ICE-4481 Did update for ICE-2614, 4080, 4803 and tested after each one--was good. After updating for ICE-4695, the scrollid in com.icesoft.faces.context.effects.DragDrop is coming back null. Note that CoreComponentsUtil is now used instead of D2DViewHandler for lookup of this id.
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/component-metadata/src/main/resources/conf/ice_properties/ice-panelGroup-props.xml
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/resources/META-INF/resources/ice-extras.js
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/GroupRenderer.java
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/ExtendedAttributeConstants.java
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/java/com/icesoft/faces/context/effects/DragDrop.java
        Commit graph ADD /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/util/DelimitedProperties.java
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/ext/HtmlPanelGroup.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P3

          People

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

            Dates

            • Created:
              Updated:
              Resolved: