Announcement

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

    Does clipping work for static text area items?

    I have a form with a read-only text area field. I want the height of the box to be the same as when it is editing (I toggle forms into edit mode via a button). When the content is larger than the height, it should clip (when read-only), but this doesn't seem to work. Can be reproduced with this example:

    Code:
        isc.DynamicForm.create({
            fields: [
                { name: 'test', type: 'textarea', canEdit: false, clipStaticValue: true, defaultValue: '1\n2\n3\n4\n5\n6', height: 30, readOnlyDisplay: 'static', staticHeight: 30 }
            ]
        })
    I would expect the height of the text area to be 30.

    #2
    Any help on this would be appreciated, because to me it seems like a bug. I just did more investigation of the code (although I use the Pro version) and couldn't find a real cause.

    Comment


      #3
      We agree this is a bug. We've just applied a fix to the 10.0p and 10.1d branches to address this.
      Please try the next nightly build, dated Aug 21 or above.

      Regards
      Isomorphic Software

      Comment


        #4
        I see some changes in the code, but I don't believe it is fixed.

        Comment


          #5
          Any updates on this? AFAIK it is not fixed.

          Comment


            #6
            Please let me know if my conclusion is correct that this isn't fixed yet.

            Comment


              #7
              Hi wallytax,
              Sorry for the delay responding. For us this appears to be working - if we paste your original sample code into the feature explorer (for the latest version of the 10.1 branch), the text is rendered correctly and clipped, as it should be.
              Can you let us know what you are seeing, and what build you are using (perhaps also with details on what browser you are using)?

              Thanks
              Isomorphic Software
              Attached Files

              Comment


                #8
                A follow up: We are investigating this further. It appears that vertical clipping is unreliable in some cases. We have a developer investigating and will follow up when we have more information for you.

                Regards
                Isomorphic Software

                Comment


                  #9
                  Ok - we believe this is now truly resolved. Please try the next nightly build, dated Oct 3 or above (10.0 or 10.1 branches)

                  Regards
                  Isomorphic Software

                  Comment


                    #10
                    Yep, it seems to be working now! Great! Thanks a lot for fixing this.

                    Comment


                      #11
                      Although I get the feeling that hovering doesn't show the full value which - according to the documentation - it should. Or not?

                      Comment


                        #12
                        I think this issue is not resolved yet and by issue, I mean the part of hovering the full value. Any comments on this?

                        Comment


                          #13
                          I investigated the problem and I believe it is caused by the valueClipped() method in FormItem. This method only checks if there's a horizontal scrolling active, not vertical. I don't see the equivalent *Height() methods, but maybe adding isc.Element.getScrollHeight(textBoxHandle) > 0 is sufficient.

                          Comment


                            #14
                            This seems to fix the issue. I used a "monkey patch", not sure if this is the best way.

                            Code:
                              isc.FormItem.addProperties({
                                valueClipped: function() {
                                  var textBoxHandle;
                                  if (this._getClipValue()) {
                                    textBoxHandle = this._getTextBoxElement();
                                    return (isc.Element.getClientWidth(textBoxHandle) < this._getTextBoxScrollWidth(textBoxHandle)) || (isc.Element.getScrollHeight(textBoxHandle) > this.getHeight());
                                  }
                                  return false;
                                }
                              });

                            Comment

                            Working...
                            X