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

Hiding Scrollbar on ion-content -> underlining issues

$
0
0

The post here offers the solution of the starting issue, which is to remove the scrollbar. This does work and do what I am after.

Which is:
ion-content {
–offset-bottom: auto!important;
–overflow: hidden;
overflow: auto;
&::-webkit-scrollbar {
display: none;
}
}

The cause and effect issue is retaining all scrolling functionality such as scrollToTop() or scrollToPoint() and interacting with Renderer2. I was able to fix the Renderer2 issue by no longer using @ HostListener on IonContent but instead on ‘scroll’ using document body scroll. This allowed me to then use Renderer2 to detect scroll events with just ‘scroll’ and do visual animation things dynamically.

But upon trying to do things like scroll to top or scroll to point like such as the code example below, it no longer works.

@ViewChild(Content) content: Content;

scrollToTop() {
this.content.scrollToTop();
}

Either A, ionic needs to find a way to allow scrollbar to hide without underlining effects like failure to access content details of IonContent or B, I ditch IonContent in my code DOM and use something else.

I did try to access the scroll host to make my own scrollToTop function around the content.ScrollToTop but it did not work on click.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48978

Trending Articles



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