Announcement

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

    issue with dragTrackerMode "record"

    SmartClient Version: v13.1p_2025-08-06/AllModules Development Only (built 2025-08-06)

    Chrome on MacOS
    Safari on iPadOS

    Hi, following the fix for this issue: https://forums.smartclient.com/forum...ari#post276203
    I was looking for a way to make it more obvious what is being dragged on touch devices.
    I thought of using dragTrackerMode: "record", but I get these errors when I try to drag:

    Code:
    10:19:26.837:MMV0:WARN:Log:TypeError: Cannot set properties of undefined (setting '$28w')
    Stack from error.stack:
        GridRenderer._cacheColumnHTML(<no args: exited>) on [GridBody ID:countryList1_body] @ ISC_Grids.js:440:255
        GridRenderer.getTableHTML(<no args: exited>) on [GridBody ID:countryList1_body] @ ISC_Grids.js:361:84
        Canvas.setDragTracker(<no args: exited>) on [DragHandlesGrid ID:countryList1] @ ISC_Core.js:5688:482
        [c]EventHandler.bubbleEvent(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2933:89
        [c]EventHandler.handleDragStart(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2812:159
        EventHandler.__handleMouseMove(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2697:5
        EventHandler._handleMouseMove(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2687:244
        [c]EventHandler.handleMouseMove(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:2687:11
        [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseMove(), _2=>[object MouseEvent]) on [Class EventHandler] @ ISC_Core.js:3032:122
        HTMLDocument.eval(event=>[object MouseEvent]) @ [no file]:3:123

    #2
    We're not reproducing this in our testing.
    We've tested using Mac + Chrome and using Safari + iPhone simulator on Mac.
    We're hitting this URL: https://smartclient.com/smartclient-...gridsTouchDrag
    ...and setting dragTrackerMode:"record" on the listGrid definition.

    Can you share your exact test case and steps to reproduce please?

    Thanks and regards

    Comment


      #3
      Apologies, I forgot that I was also trying to freeze the dragHandle column at the same time.
      Here is the complete test case:

      Code:
      isc.defineClass("DragHandlesGrid", "ListGrid").addProperties({
          canReorderRecords: true,
          canDragRecordsOut: true,
          canAcceptDroppedRecords: true,
          showInitialDragHandles: true,
          dragDataAction: "move",
          dragTrackerMode:"record",
          initWidget: function () {
              this.Super("initWidget", arguments);
              if (this.showInitialDragHandles) {
                  this.observe(this, "drawn", "observer.freezeField(0);");
              }
          },
          showDragHandles : function () {
              this.setFieldProperties("countryCode", {align: "center"});
              this.Super("showDragHandles");
          },
          hideDragHandles : function () {
              this.setFieldProperties("countryCode", {align: null});
              this.Super("hideDragHandles");
          }
      });
      
      isc.HStack.create({membersMargin:10, height:160, left:20, members:[
          isc.DragHandlesGrid.create({
              ID: "countryList1",
              width:325, height:224,
              data: countryData,
              fields:[
                  {name:"countryCode", title:"Flag", width:65, type:"image", align:"center",
                   imageURLPrefix:"flags/24/", imageURLSuffix:".png"},
                  {name:"countryName", title:"Country"},
                  {name:"capital", title:"Capital"}
              ]
          }),
          isc.VStack.create({width:32, height:74, layoutAlign:"center", membersMargin:10, members:[
              isc.Img.create({src:"[SAMPLE]icons/32/arrow_right.png", width:32, height:32,
                  click:"countryList2.transferSelectedData(countryList1)"
              }),
              isc.Img.create({src:"[SAMPLE]icons/32/arrow_left.png", width:32, height:32,
                  click:"countryList1.transferSelectedData(countryList2)"
              })
          ]}),
          isc.DragHandlesGrid.create({
              ID: "countryList2",
              width:225, height:224, showAllRecords:true,
              fields:[
                  {name:"countryCode", title:"Flag", width:65, type:"image", align:"center",
                   imageURLPrefix:"flags/24/", imageURLSuffix:".png"},
                  {name:"countryName", title:"Country"}
              ],
              emptyMessage: "drop rows here"
          })
      ]})
      
      isc.Button.create({
          top: 250, left: 20, autoFit: true,
          title: "Hide Drag Handles",
          click : function() {
              var hidden = this.hidden;
              if (hidden) {
                  countryList1.showDragHandles();
                  countryList2.showDragHandles();
                  this.setTitle("Hide Drag Handles");
              } else {
                  countryList1.hideDragHandles();
                  countryList2.hideDragHandles();
                  this.setTitle("Show Drag Handles");
              }
              this.hidden = !hidden;
          }
      });
      Is this something you can support, or should I give up on the idea of freezing the column?

      Comment


        #4
        hi Claudio - thanks for the extra detail. This was a bug and has been fixed for tomorrow's builds, dated August 9, and later ones.

        Comment


          #5
          SmartClient Version: v13.1p_2025-08-09/AllModules Development Only (built 2025-08-09)

          I confirm that it works now, thank you very much!

          Comment

          Working...
          X