Skip to content
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

In Days View, vertical scroll is disabled on Safari #358

Closed
sureshdotariya opened this issue Oct 16, 2017 · 11 comments
Closed

In Days View, vertical scroll is disabled on Safari #358

sureshdotariya opened this issue Oct 16, 2017 · 11 comments

Comments

@sureshdotariya
Copy link

Hi

we have integrated this calendar component in our Angular 4 mobile app and web app. ,On IOS 11 and Safari browser (MAC), the day view section is not vertically scrollable if we scroll on hour segments. But we are able to scroll vertically inside the events(pink and yellow boxes).

This same issue is reproducible if we access the demo URL https://mattlewis92.github.io/angular-calendar/#/kitchen-sink in safari browser.

Versions

Angular: 4.3.6

Calendar library: 0.17.4

Browser name and version: Safari 11

@mattlewis92
Copy link
Owner

It looks like a bug with safari, I'd imagine its probably fixable with a tiny bit of CSS. Would you be able to have a go at fixing it as I'm pretty short of time for OSS atm. This is probably a good place to start: https://www.google.co.uk/search?q=safari+overflow-x%3A+scroll+not+working

This is where overflow-x:scroll is set in the code.

Thanks! 😄

@mattlewis92
Copy link
Owner

Aha, I think I found a fix for this, it was caused by hammerjs blocking touch events on anything with a click handler. If you add this patch to your global CSS, does it fix it for you?

mwl-calendar-day-view-hour-segment {
    // hacky fix for https://github.com/mattlewis92/angular-calendar/issues/358 and hammerjs breaking scrolling
    touch-action: initial !important;
    user-select: initial !important;
    -webkit-user-drag: initial !important;
}

@sureshdotariya
Copy link
Author

Hi,

Sorry for the late reply. We tried adding the above CSS in the global style.css and it's not working.

Please re-open this issue.

Thanks...

@sureshdotariya
Copy link
Author

Hi,

We able to fix this by over-riding touchAction from none to 'pan-y' on 'HammerGestureConfig' class in app.module.ts

Here is the code:

import { HammerGestureConfig, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
declare var Hammer: any;
// to override hammerjs touchAction none to pan-y
export class MyHammerConfig extends HammerGestureConfig {
buildHammer(element: HTMLElement) {
let mc = new Hammer(element, {
touchAction: "pan-y"
});
return mc;
}
}

//in providers array in NgModule
{
provide: HAMMER_GESTURE_CONFIG,
useClass: MyHammerConfig
}

Tested in Iphone 6, iphone6+ and safari 11.

Thanks...

@akamat35
Copy link

Hi,

Tried the solutions elicited above but still having issues scrolling the day view on the calendar on iOS. We need to use hammerjs as we are using Angular Material too. Without hammerjs it seems to be working fine.

Kindly advise.

Thanks,
Ankita

@mattlewis92
Copy link
Owner

Please can you give 0.23.4 a go, it should have fixed it 😄

@akamat35
Copy link

I tried the latest version with 0.23.4. No luck 😒 Should I add the previous fix suggested in this post too?

@mattlewis92
Copy link
Owner

huh, that's odd, I just double checked the demo on my iphone and it scrolls ok for me. Maybe try the fix suggested from #358 (comment)

@akamat35
Copy link

I tried the solution in the comment, but then I have an issue with Angular Material component slide-toggle as it would not drag anymore. Looks like the chicken & egg problem 😒

@amittrehan44
Copy link

Any one able to solve this?

@mrvet
Copy link

mrvet commented Nov 13, 2018

Hello, please help me! Safari on iPhone don't show async events. I'm trying use your example https://mattlewis92.github.io/angular-calendar/#/async-events but on MacOS on Safari browser don't show events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants