hugosslade

Menu unpredictable behaviour fix

Jul 8th, 2013
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Add this snippet as the first line of the following functions
  2.  
  3. function selectTargetTab(e){
  4.     if( Modernizr && Modernizr.touch ) { return; } //add this - some devices were capturing mouse events with touch
  5.     //... rest of function 
  6. }
  7.  
  8. function deselectTargetTab(e){
  9.     if( Modernizr && Modernizr.touch ) { return; }
  10.     //... rest of function
  11. }
  12.  
  13. // And then change this line in function selectTargetTabTouch(e){}
  14. if( el.is("a") || el.is("button") || el.is("input") )
  15. // To this
  16. if( target.is("a") || target.is("button") || target.is("input") )
  17.  
  18. //This works in my tests but without access to the site files I can't guarantee this will fix it (although I don't see why not)
Advertisement
Add Comment
Please, Sign In to add comment