Skip to content

Commit 7f7d42b

Browse files
committed
removing bodyClick from dist versions
1 parent 9a9d701 commit 7f7d42b

File tree

4 files changed

+3
-33
lines changed

4 files changed

+3
-33
lines changed

dist/styleguide/js/patternlab-pattern.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,6 @@ if (self != top) {
4747
};
4848
}
4949

50-
// if there are clicks on the iframe make sure the nav in the iframe parent closes
51-
var body = document.getElementsByTagName('body');
52-
body[0].onclick = function(e) {
53-
e.preventDefault();
54-
e.stopProgation();
55-
var targetOrigin = (window.location.protocol == "file:") ? "*" : window.location.protocol+"//"+window.location.host;
56-
var obj = JSON.stringify({ "event": "patternLab.bodyClick", "bodyclick": "bodyclick" });
57-
parent.postMessage(obj,targetOrigin);
58-
console.log(document.activeElement);
59-
document.activeElement.focus();
60-
//return false;
61-
};
62-
6350
}
6451

6552
// watch the iframe source so that it can be sent back to everyone else.

dist/styleguide/js/patternlab-pattern.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/styleguide/js/patternlab-viewer.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,19 +1248,6 @@ if (self != top) {
12481248
};
12491249
}
12501250

1251-
// if there are clicks on the iframe make sure the nav in the iframe parent closes
1252-
var body = document.getElementsByTagName('body');
1253-
body[0].onclick = function(e) {
1254-
e.preventDefault();
1255-
e.stopProgation();
1256-
var targetOrigin = (window.location.protocol == "file:") ? "*" : window.location.protocol+"//"+window.location.host;
1257-
var obj = JSON.stringify({ "event": "patternLab.bodyClick", "bodyclick": "bodyclick" });
1258-
parent.postMessage(obj,targetOrigin);
1259-
console.log(document.activeElement);
1260-
document.activeElement.focus();
1261-
//return false;
1262-
};
1263-
12641251
}
12651252

12661253
// watch the iframe source so that it can be sent back to everyone else.
@@ -1881,11 +1868,7 @@ window.addEventListener("message", receiveIframeMessage, false);
18811868

18821869
if (data.event !== undefined) {
18831870

1884-
if (data.event == "patternLab.bodyClick") {
1885-
1886-
closePanels();
1887-
1888-
} else if (data.event == "patternLab.pageLoad") {
1871+
if (data.event == "patternLab.pageLoad") {
18891872

18901873
if (!urlHandler.skipBack) {
18911874

0 commit comments

Comments
 (0)