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

When I click to open "sidr side menu" I´m also clicking on my sidr menu item #165

Closed
oscar5 opened this issue May 13, 2014 · 14 comments
Closed

Comments

@oscar5
Copy link

oscar5 commented May 13, 2014

I followed the sidr documentation here: http://www.berriart.com/sidr/.

And I already have my sidr side left menu working fine.

But on my mobile,only on android default browser, when I click in my link "Open Menu" I also click on my menu item "Menu 1", and so it opens my submenu items with my toggle effect. And I dont want this.

I just want to open my submenu items when I click in my Menu items, and not in my link to open the menu.

I found a solution, that is, if I put my sidr menu with some margin top, to not align with my link to open the menu, the problem is solved, like in my second image.

But I dont want to give that margin-top, so Im trying look for other solution.

Somebody there have exprience with this plugin and can give me a help??

If my link to open the sidr menu is aligned with my menu Item, Im clicking on both when I click to open the menu!

If my link to open the menu is not aligned with menu 1... I only click on my link and it works fine!

This is my jQuery to start sidr plugin:

 $(document).ready(function() {
      $('#simple-menu').sidr({
           name: 'sidr', 
          speed: 200, 
          side: 'left',
          source: null, 
          renaming: true, 
          body: 'body'

         });
    });        
$(document).ready(function() {
    $('.sub-menu-sidr').hide();
    });
});
@dented
Copy link

dented commented May 21, 2014

Add this line after line 304 which is the e.preventDefault(); inside the only click event.

e.stopPropagation(); // add this

@MrMooky
Copy link

MrMooky commented Jun 16, 2014

We're having the same issue. Unfortunately, this "fix" doesn't work.

@biyanpasau
Copy link

Same here. Hopefully someone finds a fix for this soon.

@englishextra
Copy link

I came accross this and found out that this happanes on smartphones. Not tablets.

What you could do right now is to:

  1. remove position relative from body element if t is there
  2. move sidr block with lists away from div.container or whatever it is in your case

@simube
Copy link

simube commented Jul 17, 2014

Same problem here! I'd like to position the menu button and the menu on the right side, but when sidr opens, it always selects the first or second menu item depending on the touch position!
I think, that android handles the touchstart/touchend events different than iOS or other devices.
please fix this issue.

@englishextra
Copy link

this issue has been discussed but arbery stays silent

@remon
Copy link

remon commented Sep 8, 2014

I used these plugin and everything is good now and problem solved with me

https://github.com/ftlabs/fastclick

@henev
Copy link

henev commented Nov 17, 2014

@simube
Copy link

simube commented Nov 24, 2014

hmm, this still does not work on my websites. see www.konkreet.ch

sideMenuLinks.on('click', function(e) {

could it be, that there is no "click" event fired, but a "touch", "touchend" or something? I don't have an android device to test...

@henev
Copy link

henev commented Nov 24, 2014

How it doesn't work when you have no android to test on ?

@simube
Copy link

simube commented Nov 24, 2014

i tested on a device of a friend... ;) sorry!

@henev
Copy link

henev commented Nov 24, 2014

Does it go into the on click callback function? Try debugging it. Check if you are binding this to the right elements. Make sure you change your plugin code.

@Kris0
Copy link

Kris0 commented Dec 10, 2014

Thank you remon. FastClick fixed the problem for me, too.

artberri added a commit that referenced this issue Jan 9, 2016
…ixes #179 and fixes #266 and fixes #246 and fixes #245 and fixes #211 and fixes #178 and fixes #118 and fixes #98  and fixes #214 and fixes #117 and fixes #130 and fixes #144 and fixes #146 and fixes #165 and fixes #189 and fixes #193 and fixes #203 and fixes #213 and fixes #218 and fixes #240 and fixes #249
@artberri
Copy link
Owner

artberri commented Jan 9, 2016

Preparing a new version with a fix for this https://github.com/artberri/sidr/tree/reborn

@artberri artberri closed this as completed Jan 9, 2016
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

10 participants