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:
Diffstat (limited to 'js/dist/dropdown.js')
-rw-r--r--js/dist/dropdown.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/js/dist/dropdown.js b/js/dist/dropdown.js
index bda07fe066..a8739e4504 100644
--- a/js/dist/dropdown.js
+++ b/js/dist/dropdown.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap dropdown.js v4.2.1 (https://getbootstrap.com/)
+ * Bootstrap dropdown.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -70,7 +70,7 @@
*/
var NAME = 'dropdown';
- var VERSION = '4.2.1';
+ var VERSION = '4.3.0';
var DATA_KEY = 'bs.dropdown';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -356,24 +356,28 @@
return $(this._element).closest('.navbar').length > 0;
};
- _proto._getPopperConfig = function _getPopperConfig() {
+ _proto._getOffset = function _getOffset() {
var _this2 = this;
- var offsetConf = {};
+ var offset = {};
if (typeof this._config.offset === 'function') {
- offsetConf.fn = function (data) {
- data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {});
+ offset.fn = function (data) {
+ data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
- offsetConf.offset = this._config.offset;
+ offset.offset = this._config.offset;
}
+ return offset;
+ };
+
+ _proto._getPopperConfig = function _getPopperConfig() {
var popperConfig = {
placement: this._getPlacement(),
modifiers: {
- offset: offsetConf,
+ offset: this._getOffset(),
flip: {
enabled: this._config.flip
},