Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49285

Detect horizontal scroll on a div

$
0
0

@Hanzo wrote:

Hi,

Hi I am trying when the user scrolls horizontally inside a div. This is my code:

<ion-header no-border no-shadow>
  <ion-navbar class="home" hideBackButton="true" no-border no-shadow>
    <ion-buttons left navPop>
      <button ion-button icon-only>
        <img src="assets/icon/ic-back.svg">
      </button>
    </ion-buttons>
    <ion-title>{{ title }}</ion-title>
    
  </ion-navbar>
  <div class="header_mask_front"></div>
  <div class="sections" (scroll)="scrollTest($event)">
    <ion-segment mode="md" [(ngModel)]="sections" color="primary">
    ...
    </ion-segment>
  </div>
</ion-header>
  scrollTest(ev:Event){
    console.warn('scroll')
  }

My problem is that the scroll event is not fired. What am I doing wrong?

Ionic 3.9.2

thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49285

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>