question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can not scroll down and up with finger in event container on mobile

See original GitHub issue

Describe the bug

Minimal reproduction of the problem with instructions

Screenshots

Versions

  • @angular/core:
  • angular-calendar:
  • Browser name and version:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
mattlewis92commented, Sep 13, 2018

This is caused by hammerjs as it adds touch-action: none to all clickable areas which prevents scrolling. If you add this to your apps global css it should fix it:

mwl-calendar-month-cell,
mwl-calendar-day-view-hour-segment, 
mwl-calendar-week-view-hour-segment {
  touch-action: auto !important;
}

Hope that helps! 😄

2reactions
wendlandreascommented, Mar 3, 2019

I found a working solution using this approach. Instead of

if (element.attributes['data-mc-options']) {
  try {
    let parseOptions = JSON.parse(element.attributes['data-mc-options'].nodeValue);
    options = parseOptions;
  } catch(err) {
    console.error('An error occurred when attempting to parse Hammer.js options: ', err);
  }
}

I use

if (element.localName === 'mwl-calendar-month-cell') {
    try {
    let parseOptions = { "touchAction": "pan-y" };
    options = parseOptions;
    } catch (err) {
    console.error('An error occurred when attempting to parse Hammer.js options: ', err);
   }
}

I am using month view only, so for week/day view you have to add the condition respectively. Not pretty but it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Single finger Scrolling for inner contents (div/iframes) in ...
Is there any way to provide single finger scrolling on the inner 'div' or 'iframes' contents using javascript or iphone safari Touch API...
Read more >
touch-action - CSS: Cascading Style Sheets - MDN Web Docs
Note that scrolling "up" (pan-up) means that the user is dragging their finger downward on the screen surface, and likewise pan-left means the ......
Read more >
Scroll View touch input on mobile - scroll by drag - Unity Forum
Maybe it's a simple fix, but using the workaround code above my scrollview has several "controls" inside of it (radiobuttons, toggles...), and ...
Read more >
Manage touch events in a ViewGroup - Android Developers
ACTION_UP -> { // Release the scroll. mIsScrolling = false false // Do not intercept touch event, let the child handle it }...
Read more >
ScrollView - React Native
In order to bound the height of a ScrollView, either set the height of the view directly (discouraged) or make sure all parent...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found