Skip to content

Commit

Permalink
Fixed event bubbling handling for empty space in Share widget and Sli…
Browse files Browse the repository at this point in the history
…de out tab.
  • Loading branch information
Paul Jackson authored and Paul Jackson committed Jul 3, 2012
1 parent 98f13e9 commit 19bc3f8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/js/pe-ap-min.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/js/workers/share.js
Expand Up @@ -205,8 +205,12 @@
});

// Close the popup menu on any click away from the links
elm.on("click touchstart", function (e) {
return false;
elm.on("click vclick", function (event) {
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
});
$(document).on("click touchstart", function (e) {
if ($popup.attr('aria-hidden') === 'false') {
Expand Down
8 changes: 6 additions & 2 deletions src/js/workers/slideout.js
Expand Up @@ -238,8 +238,12 @@
elm.on("keydown", keyhandler);

// Close slideout if clicking outside of the slideout area
elm.on("click touchstart", function (e) {
return false;
elm.on("click vclick", function (event) {
if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
});
$(document).on("click touchstart", function () {
if (opened) {
Expand Down

0 comments on commit 19bc3f8

Please sign in to comment.