Permalink
Browse files

Patch for issue #2 Shouldn't alter location.hash if no default target…

… id set
  • Loading branch information...
1 parent b605f94 commit 7dcd0380fa00787d044c209816fd538e472af9f8 @Trott Trott committed May 31, 2012
View
@@ -166,7 +166,7 @@
}
}
- if (!location.hash) {
+ if ((!location.hash) && (defaultTargetId!=='')) {
location.hash = '#/' + defaultTargetId;
}
showContent(location.hash.substring(2), [defaultTargetId]);

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<title>Lightning Touch Demos</title>
<meta name="viewport" content="width=device-width">
-<script src="LightningTouch-1.0.1.min.js"></script>
+<script src="LightningTouch-1.0.2.min.js"></script>
<!--
Function for onclick() handling so it can be compared to Lightning Touch.
@@ -53,4 +53,4 @@
<a href="#" onclick="swap('onclick-main','less-awesome'); return false;">Tap to reset onclick listener.</a>
</div>
- </section>
+ </section>
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<title>Lightning Touch Test</title>
+<meta name="viewport" content="width=device-width">
+<script src="../LightningTouch.js"></script>
+
+<body>
+ <p>There should be no hash inserted in the URL on this page.</p>
+</body>
+

0 comments on commit 7dcd038

Please sign in to comment.