Is there a way to block ionic scroll while dragging?

I created a “side cards” with additional informations about an item of a list of photos, using dragLeft dragRight etc… But, while these events is fired Ionic scroll also is fired :confused:

This is annoying and is breaking my ideia, is there someway to programatically disable Ionic scroll?

My source code is on gitHub and is running well on, in the cordova build the app is working just like in the browser.

After logged with instagram you need to drag from the right to the left of any image to see more infos about the photo.

This was discussed here Ionic-Content - Disable Vertical Scroll While Dragging

Have you seen data-tap-disabled?

1 Like

Thank you so much this is exactly what I needed. I had a rotating knob in a UI that I needed to disable scrolling while dragging.

For me tapDisabled doesn’t work, as the value change isn’t applied to the current event.

I found a fairly simple solution using $ionicGesture and $ionicScrollDelegate:

$ionicGesture.on( 'drag', drag, element );
function drag( event ){
    if( conditionThatVerifiesTheUserDoesntWantToScroll ){
        $ionicScrollDelegate.freezeScroll( true );
        // Here goes the dragging logic