You found a bug! We've classified it as EXTJS-10990 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    2
    Vote Rating
    0
    fischerw is on a distinguished road

      0  

    Default Ext.util.Positionable.getConstrainVector() incorrectly handles insets

    Ext.util.Positionable.getConstrainVector() incorrectly handles insets


    In 4.2.1, in the code block starting on line 669 of Ext.util.Positionable, the constraintInsets are used to adjust constrainTo.

    if (constraintInsets) {
    constraintInsets = Ext.isObject(constraintInsets) ? constraintInsets : Ext.Element.parseBox(constraintInsets);
    constrainTo.adjust(constraintInsets.top, constraintInsets.right, constraintInsets.bottom, constraintInsets.length);
    }

    As indicated by the bold text, it is passing constraintInsets.length, when it should be constraintInsets.left.

    Also, in the Ext.util.Region.adjust() function, it is adding the right and bottom insets to the constrainTo values. But, since these are defined as insets, it should be subtracting the insets from the right and bottom values.

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,094
    Vote Rating
    59
    Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about

      0  

    Default


    Thank you for reporting this issue. Do you by any chance have a test case which reproduces the issue for our developers to look at?

  3. #3
    Sencha User
    Join Date
    Jun 2013
    Posts
    2
    Vote Rating
    0
    fischerw is on a distinguished road

      0  

    Default


    Not a simple test case. But, if they just look at the code in Ext.util.Positionable.getConstrainVector(), where constrainTo.adjust() is called, it is very obvious that the last parameter should be constraintInsets.left, not constrainInsets.length.

    For the second part, I'm not as concerned about it, I can just make my insets a negative number to achieve what I want.

  4. #4
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,094
    Vote Rating
    59
    Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about Gary Schlosberg has a spectacular aura about

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1

Tags for this Thread