Mobile fixes

This commit is contained in:
2015-03-31 17:36:29 +02:00
parent 792a31edfd
commit 42b77b164e
7 changed files with 14 additions and 7 deletions
@@ -54,6 +54,9 @@ DragNDrop.Draggable = Ember.Mixin.create
if Math.abs(@touchStartEvent.pageX - touch.pageX) < 2 and Math.abs(@touchStartEvent.pageY - touch.pageY) < 2
# The preventDefaults are preventing the click action to fire, therefore we trigger it ourselves
# But do not trigger when a handle insed the element is clicked
#NOTE: I think that $(ev.target).click() will work for all cases, makes the code simpler,
# but no time to test that now. Tested mostly on section elements, since they are draggable, clickable
# and have subclickable buttons
unless $(ev.target).parents('.handles-inside-draggable') or $(ev.target).hasClass('handles-inside-draggable')
@click() if @click
else