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

iOS7 click events don't reach the links within the pages #11

Closed
shinefour opened this issue Oct 15, 2013 · 4 comments
Closed

iOS7 click events don't reach the links within the pages #11

shinefour opened this issue Oct 15, 2013 · 4 comments
Assignees
Labels

Comments

@shinefour
Copy link

hey. First of all. great plugin. Thanks for your work.
I noticed though, that ... iOS7 click events don't reach the links within the pages

even on http://stereobit.github.io/dragend/ the links won't get triggered in iOS7.

any idea? Thanks

@Stereobit
Copy link
Owner

Hi,

thanks for pointing this out. You can prevent this by overwriting the hammer settings with in the settings with

{
// other settings
    hammerSettings     : {
          drag_min_distance: 0,
          css_hacks        : false,
          prevent_default  : false
    }
}

~ Tobi

@Stereobit
Copy link
Owner

Please let me know if this helps.

@ghost ghost assigned Stereobit Oct 16, 2013
@shinefour
Copy link
Author

Hey Tobi,

sadly this didn't work for me. In the end I had to assign something like the following to make the gesture come through. It doesn't yet work great on Firefox, but at least iOS and Android work.

var clickSimulator = function ( evt ){
  // prevent this from working on Computers
  if( evt.type != 'click' ){
    var theEvent = document.createEvent('MouseEvents');
    theEvent.initEvent( 'click', true, true );
    evt.target.dispatchEvent( theEvent );
    evt.stopPropagation();
    evt.preventDefault();
  }
};
$( ".mosaic-item" ).on( 'tap', clickSimulator );

http://pre.ciudadvirtual.tv

If you have any other insight please let me know.
~ Daniel

@Stereobit
Copy link
Owner

Should be fixed in the new version.

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

2 participants