I cannot get scroll event from my ion-content

I have hooked the event (ionScroll) of my ion-content but nothing happened when I scroll.

However when I inspect my page and found the shadow element inside ion-content with tag:
<main class="inner-scroll scroll-y"> have scrollTop value.

How can I get the scrollTop value from the shadow element <main> in my page.ts?

So there are two problems:

  1. no scroll even emitted from ion-content
  2. I want to get the shadow element in typescript.

PS. I am using Ionic 5


You need to enable the Scroll Events, which are disabled by default. Add [scrollEvents]="true" to your Content