1. #1
    Ext JS Premium Member
    Join Date
    Sep 2007
    Posts
    51
    Vote Rating
    0
    mvarshavsky is on a distinguished road

      0  

    Default Unanswered: Scrollable within scrollable

    Unanswered: Scrollable within scrollable


    Is there a way to cancel event bubbling on scrollable events? I have a scrollable within another one and would like the outer to not move around when inner one's getting scrolled. I can on 'scrollstart' find the outer view and disable its scrollable, but hoping there's something less hacky...

    Code:
    Ext.application({
        name: 'Sencha',
        launch: function () {
            return Ext.create("Ext.Panel", {
                fullscreen: true,
                tabBarPosition: 'bottom',
                layout: {
                    type: 'fit'
                },
                scrollable: {
                    direction: 'vertical'
                },
                items: [{
                    layout: {
                        type: 'vbox',
                        align: 'sretch'
                    },
                    items: [{
                        html: 'header',
                        style: 'background:limegreen',
                        height: 200
                    }, {
                        style: 'background:pink',
                        flex: 1,
                        layout: 'fit',
                        margin: 100,
                        items: [{
                            html: 'also a scrollable section',
                            scrollable: {
                                direction: 'both'
                                directionLock: true
                            }
                        }]
                    }]
                }]
            });
        }
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,582
    Vote Rating
    433
    Answers
    3101
    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


    None of the scroll events are preventable.
    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
    Ext JS Premium Member
    Join Date
    Sep 2007
    Posts
    51
    Vote Rating
    0
    mvarshavsky is on a distinguished road

      0  

    Default


    Mitchell, thanks for responding! Perhaps let me rephrase the question... In the situation of one scrollable within another, what's the best way to prevent scrolling the outer container and localize the effect to just the inner one? Like stopping propagation of drag events within the scrollable?