• Hello!

    I’m having an issue with IE11: links are not working properly. The first time I load the page and navigate in my website the link are not active, BUT if it refresh the page they works, even thoguh not always. It happens only with Internet Explorer.

    Error log said it was a “object doesn’t support property or method ‘addeventlistener'”.

    So I tried to edit the navigate.js of my theme from this

    for ( i = 0, len = links.length; i < len; i++ ) {
    		links[i].addEventListener( 'focus', toggleFocus, true );
    		links[i].addEventListener( 'blur', toggleFocus, true );
    	}
    

    to this

    for ( i = 0, len = links.length; i < len; i++ ) {
    
    		 if (links[i].addEventListener) { // W3C DOM
    		 	links[i].addEventListener( 'focus', toggleFocus, true );
    		links[i].addEventListener( 'blur', toggleFocus, true );}
          
       else if (links[i].attachEvent) { // IE DOM
         
    		links[i].attachEvent( 'focus', toggleFocus, true );
    		links[i].attachEvent( 'blur', toggleFocus, true );
    	}
    }

    Now, I don’t get the error anymore, but other people do. What it can be? Is the code I edited correct?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi layza,

    The navigation.js file is from your theme and isn’t required by MMM (in fact you should dequeue it if it’s not needed elsewhere on your site).

    I suspect the reason your fix hasn’t worked for some people is because their browsers are loading a cached version of the file without your changes, but regardless, you could completely remove that file (if it’s safe to do so without breaking other bits of your theme).

    Regards,
    Tom

    Thread Starter layza

    (@layza)

    Hi there,

    thanks for your reply. Eventualy I realized that wasn’t a MMM file and that it wasn’t necessary, so I dequed it. But, apparently, someone still have the issue.

    Could it be some compatibility problem with the theme? I’m using Underscores.

    Thanks

    Plugin Author megamenu

    (@megamenu)

    Hi Layza,

    I suspect they will need to clear their browser cache. Or if you have any caching or a CDN set up yourself, clear those too.

    Regards,
    Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Menu not workgin properly in IE11’ is closed to new replies.