Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit c967ab3

Browse files
committed
making sure the a tag search finds *all* a tags including pattern links
1 parent d8fc9b0 commit c967ab3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

source/_patternlab-files/styleguide.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
var aTags = document.getElementsByTagName("a");
4242
for (a in aTags) {
4343
aTags[a].onclick = function(e) {
44-
e.preventDefault();
45-
if (this.getAttribute("class") != "patternLink") {
44+
if (self != top) {
45+
e.preventDefault();
4646
window.location.replace(this.getAttribute("href"));
4747
}
4848
};

source/_patternlab-files/viewall.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
var aTags = document.getElementsByTagName('a');
4343
for (a in aTags) {
4444
aTags[a].onclick = function(e) {
45-
e.preventDefault();
46-
if ((self != top) && (this.getAttribute("class") != "patternLink")) {
45+
if (self != top) {
46+
e.preventDefault();
4747
window.location.replace(this.getAttribute("href"));
4848
}
4949
};

0 commit comments

Comments
 (0)