Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Tokyo, Japan
    Posts
    7
    Vote Rating
    0
    ryu1kn is on a distinguished road

      0  

    Default setScrollable(false) doesn't work

    setScrollable(false) doesn't work


    REQUIRED INFORMATION




    Ext version tested:
    • Sencha Touch 2.1.0
    Browser versions tested against:
    • Chrome 20 (Linux)
    Description:
    • setScrollable(false) doesn't take effect once you do setScrollable(true)
    • Also tested with ST2.0.1.1 and it worked fine
    Steps to reproduce the problem:
    • Set scrollable false after you set it true
    The result that was expected:
    • Container is no longer scrollable
    The result that occurs instead:
    • Container is still scrollable
    Test Case:


    Code:
    Ext.define("ToggleScrollable.view.Main", {
        extend: 'Ext.Panel',
        fullscreen: true,
        config: {
            items: [{
                xtype: 'actionsheet',
                height: 150,
                hideOnMaskTap: true,
                items: [{
                    text: 'Do nothing'
                }, {
                    text: 'Do nothing, either',
                }]
            }, {
                xtype: 'button',
                text: 'Show ActionSheet',
                listeners: {
                    tap: function () {
                        this.up('panel').down('actionsheet').show();
                    }
                }
            }, {
                xtype: 'button',
                text: 'Toggle ActionSheet#scrollable',
                state: false,
                listeners: {
                    tap: function () {
                        var panel = this.up('panel'),
                            sheet = panel.down('actionsheet');
                        panel.setHtml('<div>set scrollable: ' + this.state + '</div>');
                        sheet.setScrollable(this.state);
                        this.state = !this.state;
                    }
                }
            }]
        }
    });





    HELPFUL INFORMATION




    Screenshot or Video:
    • none
    See this URL for live test case: http://




    Debugging already done:
    • none
    Possible fix:
    • not provided
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • Linux

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,624
    Vote Rating
    434
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    A better test case I have come up with:

    Code:
    Ext.Viewport.add({
        xtype : 'panel',
        items : [
            {
                xtype   : 'button',
                text    : 'Toggle Scrollable (turn on)',
                handler : function(btn) {
                    var panel         = btn.up('panel'),
                        scrollable    = panel.getScrollable(),
                        newScrollable = scrollable && !scrollable.getScroller().getDisabled() ? false : true;
    
                    panel.setScrollable(newScrollable);
    
                    btn.setText('Toggle Scrollable (turn ' + (newScrollable ? 'off' : 'on') + ')');
                }
            }
        ]
    });
    Testing in the code that will be 2.1.1 and this is now working so this is fixed for the next release.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    May 2012
    Location
    Tokyo, Japan
    Posts
    7
    Vote Rating
    0
    ryu1kn is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    Testing in the code that will be 2.1.1 and this is now working so this is fixed for the next release.
    Alright. Thanks for the reply, mitchell.

  4. #4
    Sencha Premium Member intellix's Avatar
    Join Date
    Mar 2012
    Location
    UK + Malta
    Posts
    262
    Vote Rating
    18
    intellix will become famous soon enough

      0  

    Default


    2.1.1 complains about requiring null instead of false

    Neither of setScrollable(null) setScrollable(false) work on DataViews