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

dayClick incorrectly triggered on scroll with touch devices #3152

Closed
mitomm opened this issue May 3, 2016 · 6 comments
Closed

dayClick incorrectly triggered on scroll with touch devices #3152

mitomm opened this issue May 3, 2016 · 6 comments
Labels

Comments

@mitomm
Copy link

mitomm commented May 3, 2016

It seems that dayClick is triggered when the calendar is scrolled (by drag it) on touch devices (at least on iOS).

I reproduced the bug here: http://jsfiddle.net/1x8L2cjr/8/

Thanks for your help

@dancintony
Copy link

I noticed the same thing. I was able to work around it with the following trick (though I'd prefer dayClick not fire during a drag):

var dragging = false;

$("body").on("touchmove", function(){ dragging = true; });
$("body").on("touchstart", function(){ dragging = false; });

Then in your dayClick, check to see if dragging is true and do an early return.

@krasnoukhov
Copy link

Here is my workaround for it:

dayClick: (date, jsEvent, view, resource) => {
  // [FIXME] Workaround for https://github.com/fullcalendar/fullcalendar/issues/3152
  if (jsEvent.originalEvent.type === "scroll") {
    return; 
  }

  // ...
}

@r4hulp
Copy link
Contributor

r4hulp commented May 7, 2016

I can confirm this, we had to fallback to old library because of this. We updated the plugin one day before going live and it broke our web app on touch devices..

@arshaw
Copy link
Member

arshaw commented May 14, 2016

thank you for this! will get this fixed

@arshaw arshaw added the Touch label May 14, 2016
@arshaw
Copy link
Member

arshaw commented May 19, 2016

can confirm. always accompanied with this:

screen shot 2016-05-18 at 9 11 48 pm

probably a recently-introduced chrome behavioral change

@arshaw arshaw changed the title dayClick triggered on scroll with touch devices dayClick incorrectly triggered on scroll with touch devices May 19, 2016
@arshaw
Copy link
Member

arshaw commented May 20, 2016

this is fixed in v2.7.2. could you please verify?

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

No branches or pull requests

5 participants