Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <markdotto@gmail.com>2019-07-13 00:56:26 +0300
committerMark Otto <markdotto@gmail.com>2019-07-13 00:56:26 +0300
commit39c4ca3970bb14372b905952699711fdd11650e6 (patch)
tree1e439928b77707924a70bd79df66d4199b0410da /js/dist/toast.js
parentaaf03bdc9e3cfa0d625f9758ad059c0db9fe2abe (diff)
dist v5
Diffstat (limited to 'js/dist/toast.js')
-rw-r--r--js/dist/toast.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/dist/toast.js b/js/dist/toast.js
index fc41ab3ce8..bb31686ed4 100644
--- a/js/dist/toast.js
+++ b/js/dist/toast.js
@@ -204,7 +204,11 @@
_proto.show = function show() {
var _this = this;
- EventHandler.trigger(this._element, Event.SHOW);
+ var showEvent = EventHandler.trigger(this._element, Event.SHOW);
+
+ if (showEvent.defaultPrevented) {
+ return;
+ }
if (this._config.animation) {
this._element.classList.add(ClassName.FADE);
@@ -244,7 +248,11 @@
return;
}
- EventHandler.trigger(this._element, Event.HIDE);
+ var hideEvent = EventHandler.trigger(this._element, Event.HIDE);
+
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
var complete = function complete() {
_this2._element.classList.add(ClassName.HIDE);