Results 1 to 4 of 4

Thread: The First Call to Ext.Component.setScrollable Does Not Work

    You found a bug! We've classified it as EXTJS-27720 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member Trevor4001's Avatar
    Join Date
    Sep 2013
    Posts
    114

    Default The First Call to Ext.Component.setScrollable Does Not Work

    Ext version tested:


    • Ext 6.5.0.775


    Browser versions tested against:


    • Chrome 70.0.3538.77



    DOCTYPE tested against:


    • html


    Description:


    • Enabling scrolling with Ext.Component.setScrollbable does not work on the first call. This seems to be because the scrollbar does not exist when Ext.Component.afterComponentLayout (line 2331) attempts to update it from a call to updateLayout in applyScrollable (line 2776).

    https://fiddle.sencha.com/#view/editor&fiddle/2n7e


    Steps to reproduce the problem:


    • Create a container with overflowing content.
    • Enable scrolling with a call to setScrollable.


    The result that was expected:


    • Scrollbars are visible.


    The result that occurs instead:


    • Scrollbars are not visible.


    Workaround:



    • The following workaround updates the layout after the scrollable value is applied.


    Code:
    Ext.define('Fiddle.overrides.Component', {
      override: 'Ext.Component',
    
      applyScrollable: function (newValue, oldValue) {
        Ext.Component.suspendLayouts();
        newValue = this.callParent(arguments);
        Ext.Component.resumeLayouts(true);
        
        return newValue;
      },
    
      updateScrollable: function (newValue, oldValue) {
        if (this.rendered && !this.destroying && !this.destroyed) {
          this.updateLayout();
        }
      }
    });
    Trevor Karjanis

  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,006

    Default

    Hi Trevor,

    Thanks for bringing this to our attention. I have shared this with the support team and they will be working on this at their earliest convenience.

    Michele

  3. #3
    Sencha Premium Member Trevor4001's Avatar
    Join Date
    Sep 2013
    Posts
    114

    Default

    Thank you!
    Trevor Karjanis

  4. #4
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    542

    Default

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

Similar Threads

  1. [FIXED] setScrollable(false) doesn't work
    By ryu1kn in forum Sencha Touch 2.x: Bugs
    Replies: 4
    Last Post: 15 Jul 2013, 1:26 PM
  2. Replies: 3
    Last Post: 26 Nov 2012, 10:36 PM
  3. Problem When using setScrollable(false) then setScrollable(true)
    By burrellramone in forum Sencha Touch 2.x: Q&A
    Replies: 3
    Last Post: 13 Jun 2012, 9:55 AM
  4. [FIXED] setScrollable() seems not to work correctly passing a string
    By harare in forum Sencha Touch 2.x: Bugs
    Replies: 3
    Last Post: 18 Mar 2012, 11:08 PM
  5. Component.setScrollable not working properly?
    By alanmies in forum Sencha Touch 2.x: Discussion
    Replies: 3
    Last Post: 17 Dec 2011, 3:30 AM

Posting Permissions

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