Results 1 to 3 of 3

Thread: Scrollable within scrollable

  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2007
    Posts
    55
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    None of the scroll events are preventable.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

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

  3. #3
    Ext JS Premium Member
    Join Date
    Sep 2007
    Posts
    55
    Vote Rating
    0
      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?

Posting Permissions

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