Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    unexpected scrolling after treegrid fetchData request

    Hello,
    I recently found a bug related to tree grids using data sources.
    When opening a folder the tree grid scrolls automatically to the selected object.
    If there is no object selected it scrolls to the top, which makes me want to grind my teeth, especially when i'm working at the lower end of a tree.
    I would have expected that the treegrid would not scroll at all after the execution of the fetchData request. Is there a possibility to achieve this behaviour?

    I've tested this with yesterdays smartClient 9.0 (2013-11-03) version.

    Regards

    #2
    A fetchData() on a TreeGrid basically introduces what could be a completely different tree, so no attempt is made to retain scroll position. You could, however, preserve the scroll position in your application by using get/setScrollLeft/Top on the "body" AutoChild.

    Comment


      #3
      I encountered this issue too. In my case, we have a load-on-demand type tree and we are not calling fetchData implicitly - just opening up folders in the tree. When a folder is opened, the tree loads and opens up the folder OK but, then _sometimes_ jumps to the top of the tree (or, to the selected node if we have one in the tree). My estimate is that ~one click in five does this for some reason.

      Shouldn't the load on demand logic of the tree try to retain the scroll position and if so, do you have any idea why it sometimes fails ?

      UPDATE - - -

      Just noticed, that this happens for us randomly on any clicks on the tree and probably has nothing to do with the loading of the data. When the tree is clicked (as it is when we open a folder) sometimes, we get a 'scrollIntoView' event and the tree jumps away from the current scroll position. Will investigate further.
      Last edited by markok; 19 Feb 2015, 06:41. Reason: update

      Comment


        #4
        Sometimes, when we click our tree (MyTree) we get this kind of progress for our log:

        Code:
        16:59:46.587:MDN0:DEBUG:EventHandler:Bubbling event 'prepareForDragging', target '[VLayout ID:isc_VLayout_40]' has handler: Canvas.prepareForDragging()
        16:59:46.587:MDN0:DEBUG:EventHandler:Event 'prepareForDragging' bubbled to top
        16:59:46.588:MDN0:DEBUG:EventHandler:Bubbling for event 'mouseDown' cancelled via STOP_BUBBLING return value by target: [TreeGridBody ID:isc_MyTree_0_body]
        16:59:46.588:MDN0:DEBUG:EventHandler:Event 'mouseStillDown' bubbled to top
        16:59:46.625:MUP4:INFO:EventHandler:Target Canvas for event 'mouseup': [TreeGridBody ID:isc_MyTree_0_body]
        16:59:46.628:MUP4:DEBUG:EventHandler:Bubbling for event 'mouseUp' cancelled via STOP_BUBBLING return value by target: [TreeGridBody ID:isc_MyTree_0_body]
        16:59:46.792:MUP4:DEBUG:EventHandler:Bubbling for event 'click' cancelled via STOP_BUBBLING return value by target: [TreeGridBody ID:isc_MyTree_0_body]
        16:59:46.793:MUP4[E]:DEBUG:EventHandler:firing threadExitActions: [
        anonymous()
        ]
        16:59:46.945:TMR0:INFO:scrolling:isc_MyTree_0_body:Drawn size: 292 by 726, specified: 308 by 308, scrollbar state: v
        
        16:59:46.948:MMV1:DEBUG:EventHandler:mousing over [ScreenSpan ID:isc_EH_screenSpan]
        16:59:47.052:FCS3:DEBUG:scrolling:isc_MyTree_0_body:scrollTo(undefined, 0), reason: scrollIntoView
        16:59:47.057:XRP2[E]:DEBUG:EventHandler:firing threadExitActions: [
        anonymous()
        ]
        16:59:47.142:TMR6:INFO:scrolling:isc_MyTree_0_body:Drawn size: 292 by 1188, specified: 308 by 308, scrollbar state: v
        16:59:47.144:TMR6:DEBUG:TreeGrid:isc_MyTree_0:delaying adjustOverflow: child resize
        16:59:47.151:MMV8:DEBUG:EventHandler:mousing out of [ScreenSpan ID:isc_EH_screenSpan]  mousing over [TreeGridBody ID:isc_MyTree_0_body]
        When this happens, the TreeGrid's body scrolls to top or to the selected node. In this case, the following events are present:

        Code:
        16:59:46.948:MMV1:DEBUG:EventHandler:mousing over [ScreenSpan ID:isc_EH_screenSpan]
        16:59:47.052:FCS3:DEBUG:scrolling:isc_MyTree_0_body:scrollTo(undefined, 0), reason: scrollIntoView
        When everything works correctly (and no erroneous scrolling happens) the log is identical but without these lines.

        What exactly is a ScreenSpan and do you have any advice on what might be going on here ? It looks like it gets focus sometimes and has something to do with the tree scrolling the selected node to the view (or root when nothing is selected).

        Sorry to hijack this thread, but I suspect other people will find this thread when they have problems with weird scrolling with their trees.

        Comment


          #5
          Reporting back that updating the 4.0p nightly we we were using resolved this issue.

          Comment

          Working...
          X