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

dojox/calendar: itemClick doesn't fire on some (faster) devices #105

Closed
Micha4711 opened this issue Dec 4, 2014 · 2 comments
Closed

dojox/calendar: itemClick doesn't fire on some (faster) devices #105

Micha4711 opened this issue Dec 4, 2014 · 2 comments

Comments

@Micha4711
Copy link

I'm using dojox/calendar in a mobile application. There is a calendar dojox/calendar/MobileCalendar widget in day/week mode. The calendar is not editable, the contained items are just clickable to get to a details view. Now, on some (fast) devices (eg Nexus 9) the itemClick event is not firing.

I debugged it and it seems, that Touch.js does not recognize my tap (I tapped very short and precisely) as click. _docEditingTouchMoveHandler marks the event as touchMoved, so it seems that a touchmove event is fired by the browser. The move distance is only a few pixels. My theory is that touchmoved gets called so often, that it is imposisble to release the finger at the same position. Maybe I'm doing something wrong, but the click event gets fired correctly on most of my (older) devices.

I'm binding itemClick as mentioned in the docs:

this.ctrlCalendar = new MobileCalendar({
store: this.calendarStore,
...
editable: false
}, this.calendarDomId);

this.ctrlCalendar.on('itemClick', function (e)
{
...
});

I managed to get it working by patching _docEditingTouchMoveHandler() in the way, that it checks the distance for a min value before setting touchMoved to true.

@damiengarbarino
Copy link
Owner

Hello,

I had a look to the code and indeed a little margin needs to be added on the move flag.

Unfortunately I'm very busy with my 'real' work on this time of year. I hope to address this beginning of next year...

Regard,

Damien

@damiengarbarino
Copy link
Owner

Fixed in master, 1.10, 1.9; tested on Nexus 7 running on Android 5.0

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

No branches or pull requests

2 participants