mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-21 04:41:36 +02:00
dist v5
This commit is contained in:
39
dist/js/bootstrap.bundle.js
vendored
39
dist/js/bootstrap.bundle.js
vendored
@@ -522,12 +522,13 @@
|
||||
delegationSelector = null;
|
||||
}
|
||||
|
||||
for (var _i = 0, _Object$keys = Object.keys(events); _i < _Object$keys.length; _i++) {
|
||||
var uid = _Object$keys[_i];
|
||||
var event = events[uid];
|
||||
var uidEventList = Object.keys(events);
|
||||
|
||||
for (var i = 0, len = uidEventList.length; i < len; i++) {
|
||||
var event = events[uidEventList[i]];
|
||||
|
||||
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
|
||||
return events[uid];
|
||||
return event;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,7 +592,7 @@
|
||||
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
|
||||
var fn = findHandler(events[typeEvent], handler, delegationSelector);
|
||||
|
||||
if (fn === null) {
|
||||
if (!fn) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5352,7 +5353,7 @@
|
||||
|
||||
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
EventHandler.trigger(SelectorEngine.findOne(Selector$4.DATA_TOGGLE, parent), 'focus');
|
||||
SelectorEngine.findOne(Selector$4.DATA_TOGGLE, parent).focus();
|
||||
}
|
||||
|
||||
Dropdown._clearMenus();
|
||||
@@ -6247,8 +6248,7 @@
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector$6 = {
|
||||
TOOLTIP_INNER: '.tooltip-inner',
|
||||
TOOLTIP_ARROW: '.tooltip-arrow'
|
||||
TOOLTIP_INNER: '.tooltip-inner'
|
||||
};
|
||||
var Trigger = {
|
||||
HOVER: 'hover',
|
||||
@@ -6343,7 +6343,7 @@
|
||||
clearTimeout(this._timeout);
|
||||
Data.removeData(this.element, this.constructor.DATA_KEY);
|
||||
EventHandler.off(this.element, this.constructor.EVENT_KEY);
|
||||
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal');
|
||||
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler);
|
||||
|
||||
if (this.tip) {
|
||||
this.tip.parentNode.removeChild(this.tip);
|
||||
@@ -6413,7 +6413,7 @@
|
||||
behavior: this.config.fallbackPlacement
|
||||
},
|
||||
arrow: {
|
||||
element: Selector$6.TOOLTIP_ARROW
|
||||
element: "." + this.constructor.NAME + "-arrow"
|
||||
},
|
||||
preventOverflow: {
|
||||
boundariesElement: this.config.boundary
|
||||
@@ -6649,11 +6649,14 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', function () {
|
||||
|
||||
this._hideModalHandler = function () {
|
||||
if (_this4.element) {
|
||||
_this4.hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler);
|
||||
|
||||
if (this.config.selector) {
|
||||
this.config = _objectSpread({}, this.config, {
|
||||
@@ -7731,7 +7734,11 @@
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
EventHandler.trigger(this._element, Event$b.SHOW);
|
||||
var showEvent = EventHandler.trigger(this._element, Event$b.SHOW);
|
||||
|
||||
if (showEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._config.animation) {
|
||||
this._element.classList.add(ClassName$a.FADE);
|
||||
@@ -7771,7 +7778,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
EventHandler.trigger(this._element, Event$b.HIDE);
|
||||
var hideEvent = EventHandler.trigger(this._element, Event$b.HIDE);
|
||||
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
_this2._element.classList.add(ClassName$a.HIDE);
|
||||
|
Reference in New Issue
Block a user