-
Notifications
You must be signed in to change notification settings - Fork 294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ionic / hide scrollbar iOS #200
Comments
Relates to -webkit-overflow-scrolling: touch; i think. I just removed it (working on a fork). Non standard: https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling |
I tried with:
But I still see the scrollbar on iOS. :( |
I don't believe a universal css property exists to hide scrollbars. However, I think there are browser-specific css tricks (or prefixes), but they're not well supported across different versions of that same browser & not all browsers even have the option at all. Also, in some cases hiding the scroll bar this way actually completely disables scrolling. Probably not a good solution, but if you only have issues with ios maybe you can find something that works. Google should help here. The best universal solution I've seen before was from stackoverflow (i think). It basically put a 25px padding on the child element & a -25px margin on the parent element. Essentially "hack" this made the scrollbar invisible in every browser & still allowed scrolling, 25px is a "magic" number, but it works well enough for most devices/browsers scrollbar size. This hack can cause minor issues with other surrounding or sibling elements positioning due to the -25px margin, but in most cases it works great. Not a perfect solution, but maybe a workaround. Hope that helps. |
Closing this because it doesn't appear to be a specific issue to virtual-scroll component, but rather a general HTML/CSS issue that would be better supported by stackoverflow/etc. Please re-open if you disagree. |
|
Hi @andreandev, ::-webkit-scrollbar, |
i find a way to hide ios safari scrollbar, but i don't know why. to add 'color' with error value can effect for me |
Unfortunately none of the solutions you posted works as of 21st Jan 2020 |
Unfortunately none of the solutions you posted works as of 21st April 2021 |
I found this. |
I arrived here via Google so please stop suggesting people to search before opening a topic if it helps people. It drives me insane |
Hi guys,
I used ionic with this fantastic virtual scroll.
I've a issue with iOS, i don't know how to hide the vertical scrollbar.
![8bufb](https://user-images.githubusercontent.com/315119/41051480-8b509f48-69b6-11e8-80df-1b02b8e50827.png)
In all the other pages I do not see it, only here where it's angular2-virtual-scroll.
This's my source code:
list.ts
<ion-content #content (ionScroll)="onContentScroll($event)" no-bounce> <ion-refresher (ionRefresh)="doRefresh($event)"> <ion-refresher-content></ion-refresher-content></ion-refresher> <virtual-scroll #virtualScroll class="resort-details-list sumbrella-list" [items]="sunbrellaData" [bufferAmount]="50" childHeight="190" [parentScroll]="content && content._elementRef.nativeElement.querySelector('.scroll-content')"> <sunbrellas *ngFor="let sunbrella of sunbrellaData" [sunbrellaData]="sunbrella" (onClick)="goToResortInfoPage($event)" [searchSunbrella]="isSearchSunbrella"></sunbrellas> </virtual-scroll> </ion-content>
list.scss
.scroll-content { overflow-y: auto !important; }
Can you help me please?
The text was updated successfully, but these errors were encountered: