diff options
author | XhmikosR <xhmikosr@gmail.com> | 2019-04-18 14:47:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 14:47:52 +0300 |
commit | 091aa1e9fd411440c3ff3c95042a5aa1502e6978 (patch) | |
tree | 9343d4a164ad6e2c064d0305ba28e6d8870029e7 /js/dist/tab.js | |
parent | 5c5b15a077b796510fce745129612ee940b13b89 (diff) |
v5 dist (#28657)
Diffstat (limited to 'js/dist/tab.js')
-rw-r--r-- | js/dist/tab.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/js/dist/tab.js b/js/dist/tab.js index dfe4071d15..d9e7f2ea0e 100644 --- a/js/dist/tab.js +++ b/js/dist/tab.js @@ -79,7 +79,9 @@ }; var triggerTransitionEnd = function triggerTransitionEnd(element) { - element.dispatchEvent(new Event(TRANSITION_END)); + var evt = document.createEvent('HTMLEvents'); + evt.initEvent(TRANSITION_END, true, true); + element.dispatchEvent(evt); }; var emulateTransitionEnd = function emulateTransitionEnd(element, duration) { @@ -123,7 +125,7 @@ var DATA_KEY = 'bs.tab'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var Event$1 = { + var Event = { HIDE: "hide" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY, SHOW: "show" + EVENT_KEY, @@ -186,12 +188,12 @@ var hideEvent = null; if (previous) { - hideEvent = EventHandler.trigger(previous, Event$1.HIDE, { + hideEvent = EventHandler.trigger(previous, Event.HIDE, { relatedTarget: this._element }); } - var showEvent = EventHandler.trigger(this._element, Event$1.SHOW, { + var showEvent = EventHandler.trigger(this._element, Event.SHOW, { relatedTarget: previous }); @@ -206,10 +208,10 @@ this._activate(this._element, listElement); var complete = function complete() { - EventHandler.trigger(previous, Event$1.HIDDEN, { + EventHandler.trigger(previous, Event.HIDDEN, { relatedTarget: _this._element }); - EventHandler.trigger(_this._element, Event$1.SHOWN, { + EventHandler.trigger(_this._element, Event.SHOWN, { relatedTarget: previous }); }; @@ -326,7 +328,7 @@ */ - EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { event.preventDefault(); var data = Data.getData(this, DATA_KEY) || new Tab(this); data.show(); |