Skip to content

Commit 85515c5

Browse files
committed
updating dist
1 parent 9ea1bbc commit 85515c5

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

dist/styleguide/js/patternlab-pattern.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,15 @@ if (self != top) {
4949

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

5863
}

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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,10 +1250,15 @@ if (self != top) {
12501250

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

12591264
}

0 commit comments

Comments
 (0)