-
26 Nov 2012 9:10 PM #1
setScrollable(false) doesn't work
setScrollable(false) doesn't work
REQUIRED INFORMATION
Ext version tested:- Sencha Touch 2.1.0
- Chrome 20 (Linux)
- setScrollable(false) doesn't take effect once you do setScrollable(true)
- Also tested with ST2.0.1.1 and it worked fine
- Set scrollable false after you set it true
- Container is no longer scrollable
- Container is still scrollable
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
Debugging already done:- none
- not provided
- only default ext-all.css
- Linux
-
27 Nov 2012 6:01 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
A better test case I have come up with:
Testing in the code that will be 2.1.1 and this is now working so this is fixed for the next release.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') + ')'); } } ] });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.
-
27 Nov 2012 5:45 PM #3
-
11 Feb 2013 3:42 AM #4
2.1.1 complains about requiring null instead of false
Neither of setScrollable(null) setScrollable(false) work on DataViews
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.


Reply With Quote