This is a migrated thread and some comments may be shown as answers.

Capturing Drag Events Dies in Browser

0 Answers 19 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 13 Jul 2012, 12:20 AM
I'm implementing the kendo.drag component on the endless scroll. The idea is to auto-hide the nav bar and tab strip on scroll up and re-show on scroll down (Like some native apps are doing.)

This code seems to work pretty well on the phone but when I test in a browser the page won't scroll. I know the events are being fired when I add alerts but the page stays unscrollable. Any ideas?

Thanks.

function hideNavBarsOnScroll() {
 
    var ggPosn = '0';
    var log = '';
    var drag = new kendo.Drag($('#endless-scrolling'), {
        start: function (e) {
            if (e.y) {
                ggPosn = $('#endless-scrolling').offset().top;
            }
        },
        move: function (e) {
            if (e.y) {
                if ($('#endless-scrolling').offset().top < ggPosn) {
                    if ($('#homeview header').is(':visible')) {
                        $('#homeview header').slideUp('slow');
                        $('#homeview .km-footer').attr('style', 'position:absolute;').animate({ 'bottom': '-' + $('#homeview .km-footer').height() + 'px' }, 'slow', function () { });
                    }
                } else {
                    if ($('#endless-scrolling').offset().top > ggPosn) {
                        if ($('#homeview header').is(':visible') == false) {
                            $('#homeview header').slideDown('slow');
                            $('#homeview .km-footer').attr('style', 'position:absolute;').animate({ 'bottom': '0px' }, 'slow', function () { });
                        }
                    }
                }
            }
        },
        end: function (e) {
            if (e.y) {
                ggPosn = $('#endless-scrolling').offset().top;
            }
        }
    });
 
}

No answers yet. Maybe you can help?

Tags
Drag and Drop
Asked by
Ben
Top achievements
Rank 1
Share this question
or