Results 1 to 7 of 7

Thread: Textarea can no longer be scrolled.

  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    384

    Exclamation Textarea can no longer be scrolled.

    When using a textarea 't', I used to use a trick whereby
    I scroll down by a large amount so that any new text is
    always typed at the bottom. eg

    t.getEl().scroll("down",100000);

    This no longer works in Ext 3. This is a breaker for me as my
    app wont work without it. The user has to manually scroll
    the textarea down every time they want to append text.

    Is there another way to do this? It works perfectly
    in Ext 2 in IE 6/7/8, FF 1.5+ and Opera/Safari. No idea why
    it fails in Ext 3.
    Last edited by mystix; 10 May 2009 at 4:40 AM. Reason: moved to 3.x Help from ux and plugins

  2. #2
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    384

    Default

    More generally I get a lot of issues with getEl(), particularly when
    using

    Ext.fly(somecomponent.getEl)

    which often returns undefined. Other times under debug it works fine.

    For example, using Ext.fly() inside 'render' code works fine in Ext 2, but
    fails in Ext 3 - I've even tried 'afterrender' but getEl() still returns undefined.

    Hope some of these issues get resolved in the final release..

  3. #3
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    384

    Default Textarea - still no good solution in Ext 3

    Still working on this, but not managed to find a solution. This is required
    so that you can have a text field which is always scrolled to the bottom.

    Otherwise, after updating the field it automatically shifts to the top (scroll
    bar at top position). If you've ever tried typing in a textarea that does that
    its not good.

    I'm thinking one solution is to create a new textarea class that inherits from
    the DOM textarea and provides access to the scroll features?

  4. #4
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    There was a bug with the scroll method that was fixed after RC1.1.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Quote Originally Posted by silcreval View Post
    More generally I get a lot of issues with getEl(), particularly when
    using

    Ext.fly(somecomponent.getEl)

    which often returns undefined. Other times under debug it works fine.

    For example, using Ext.fly() inside 'render' code works fine in Ext 2, but
    fails in Ext 3 - I've even tried 'afterrender' but getEl() still returns undefined.

    Hope some of these issues get resolved in the final release..
    That indicates to me that you don't know how to wait until after render to start accessing a Component's elements.

    There will not be an element to get until the Component has been rendered.

    And if you use debug, it will slow down enough to allow the element to render by the time you get to that code.

  6. #6
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    384

    Default

    I did try using 'afterrender', but this didnt help.

  7. #7
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    384

    Default

    evant - thanks for the info re the scroll method. I think that was probably
    the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •