Skip to content

Commit

Permalink
IE 8 does not support stopPropagation on the event. Using event.cance…
Browse files Browse the repository at this point in the history
…lBubble for IE 8 instead.
  • Loading branch information
ddotm committed Oct 18, 2013
1 parent 1da4bd1 commit 6989573
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
13 changes: 0 additions & 13 deletions toastr.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
/*
* Toastr
* Version 2.0.1
* Copyright 2012 John Papa and Hans Fjällemark.
* All Rights Reserved.
* Use, reproduction, distribution, and modification of this code is subject to the terms and
* conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php
*
* Author: John Papa and Hans Fjällemark
* Project: https://github.com/CodeSeven/toastr
*/
.toast-title {
font-weight: bold;
}
Expand All @@ -24,7 +13,6 @@
color: #cccccc;
text-decoration: none;
}

.toast-close-button {
position: relative;
right: -0.3em;
Expand All @@ -48,7 +36,6 @@
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
filter: alpha(opacity=40);
}

/*Additional properties for button version
iOS requires the button element instead of an anchor tag.
If you want the anchor version, it requires `href="#"`.*/
Expand Down
6 changes: 5 additions & 1 deletion toastr.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,11 @@
}
if (options.closeButton && $closeElement) {
$closeElement.click(function (event) {
event.stopPropagation();
if( event.stopPropagation ) {
event.stopPropagation();
} else if( event.cancelBubble !== undefined && event.cancelBubble !== true ) {
event.cancelBubble = true;
}
hideToast(true);
});
}
Expand Down
2 changes: 1 addition & 1 deletion toastr.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions toastr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6989573

Please sign in to comment.