Announcement

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

    CanvasItem possible bug

    Hi, I have a problem that I'm still investigating but in diagnosing it I came across what I think is a code bug.

    Currently testing with "v11.1p_2017-07-12/EVAL Deployment" on Chrome (60.0.3112.78):

    In ISC_Forms.js we have the following in the placeCanvas() method of CanvasItem:

    Code:
    var spacerOffsets = spacerParent ? isc.Element.getOffsets(spacerParent, containerHandle) : [B][0,0][/B],
        left = spacerOffsets[B][isc.Canvas.LEFT][/B] + containerWidget.getScrollLeft(),
        top = spacerOffsets[B][isc.Canvas.TOP][/B] + containerWidget.getScrollTop();
    In the case where spacerParent is null, spacerOffsets gets set to the array [0,0]. left and top try to access this array on initialisation using isc.Canvas.LEFT and isc.Canvas.TOP as keys. However, these constants are set to the strings 'left' and 'top' so accessing them on an array initialised with [0,0] returns a NaN. I don't think this is right, it causes a sizing error to be reporting in the logs.

    #2
    Please do always test with the latest downloadable version.
    This helps not only the developers of isomoprhic, but also yourself, because this might be already fixed.
    If you have tested it against the latest version, add a note with the version.

    Best regards

    Comment


      #3
      Actually, in this case, he was right about the code being just wrong here. We don't have a test case showing how this comes up, but we are correcting the code nevertheless.

      Comment


        #4
        Builds on Aug 1 or later have been fixed.

        Comment


          #5
          Wonderful, thanks guys.

          Comment

          Working...
          X