Announcement

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

    Minor bug in ListGrid drag'n'drop - latest nightly

    Version: SC_SNAPSHOT-2011-07-21/LGPL Development Only (built 2011-07-21)

    Steps to reproduce:
    1) open feature explorer
    2) open "Drag & Drop" -> "Drag tree (move)"
    3) switch to tab "example Data"
    4) disable the tree nodes of "partsTree2":
    Code:
    isc.Tree.create({ID:"partsTree2", root:{children:[
        {name:"Bin 3", children:[
            {name:"Blue Part", icon:"piece_blue.png", enabled: false},
            {name:"Green Part", icon:"piece_green.png", enabled: false},
            {name:"Yellow Part", icon:"piece_yellow.png", enabled: false}
        ]}
    ]}})
    5) Try it
    6) Drag a piece from the left hand side and move it onto the "Green Part" on the right hand side
    7) js error is thrown:
    Code:
    09:48:46.303:TMR5:WARN:Log:TypeError: this._dragLine is undefined
        ListGrid.showDragLineForRecord(_1=>2,  _2=>"after", undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef)
        Class.invokeSuper(_1=>{Obj},  _2=>"showDragLineForRecord",  _3=>2,  _4=>"after",  _5=>undef,  _6=>undef,  _7=>undef)
        TreeGrid.showDragLineForRecord(2, "after")
        TreeGrid.dropMove({Obj}, undef)
        [c]EventHandler.bubbleEvent(_1=>{Obj},  _2=>"dropMove",  _3=>undef)
        [c]EventHandler.handleEvent(_1=>{Obj},  _2=>"dropMove")
        [c]EventHandler.handleDragMove()
        EventHandler.._handleMouseMove(null, {Obj})
        EventHandler._handleMouseMove(null, {Obj})
        EventHandler._delayedMouseMove(1311320926278)
        [c]Class.fireCallback(_1=>{Obj},  _2=>undef,  _3=>[object Array],  _4=>{Obj},  _5=>true)
        Timer._fireTimeout("$ir2760")
        unnamed()
        unnamed() @
    8) Once you move the piece above or below the disabled nodes, the _dragLine is there and the error disappears
    9) Resolution:
    in "showDragLineForRecord", change
    Code:
    if (!this.recordIsEnabled(recordNum) && recordNum != lastVisibleRow) return this._dragLine.hide();
    to
    Code:
    if (this._dragLine && !this.recordIsEnabled(recordNum) && recordNum != lastVisibleRow) return this._dragLine.hide();

    #2
    So this basically happens dragging into a grid with all records disabled. Thanks for the fix.

    Comment

    Working...
    X