bradfrost / patternlab

Make a pattern library using atomic design.
853 stars 116 forks source link

link without href attribute #24

Closed LostKobrakai closed 10 years ago

LostKobrakai commented 10 years ago

Hi there, I just discovered a strange behavior with link-elements without a href-attribute.

I've added this part to my _header.mustache and the init.js

<a id="nav-toggle" class="nav-toggle">Menu</a>

$("#nav-toggle").click(function(e){
    e.preventDefault();
});

even though isDefaultPrevented() alerts true, patternlab still tries to load a new page:

Not Found

The requested URL /patterns/02-organisms-00-global-00-header/null was not found on this server.

After that I can't load different patterns until I fully reload the page.

Adding a href="#" solves the misbehavior.

Greetings, Benjamin

dmolsen commented 10 years ago

@LostKobrakai -

This is actually fixed in dev but I've been holding up a new release as I re-build a bunch of stuff. For now just continue to use the #. Thanks for the heads up.