mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Merge branch 'v4-dev' into form-tweaks
This commit is contained in:
commit
0a2bf9d098
@ -4078,6 +4078,7 @@ tbody.collapse.show {
|
||||
|
||||
.card-title {
|
||||
margin-bottom: 0.75rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.card-subtitle {
|
||||
|
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css.map
vendored
2
dist/css/bootstrap.min.css.map
vendored
File diff suppressed because one or more lines are too long
@ -8,16 +8,14 @@ if (typeof jQuery === 'undefined') {
|
||||
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
|
||||
}
|
||||
|
||||
+function ($) {
|
||||
(function ($) {
|
||||
var version = $.fn.jquery.split(' ')[0].split('.')
|
||||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
|
||||
}
|
||||
}(jQuery);
|
||||
|
||||
|
||||
+function () {
|
||||
})(jQuery);
|
||||
|
||||
(function () {
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
@ -551,6 +549,7 @@ var Carousel = function ($) {
|
||||
var TRANSITION_DURATION = 600;
|
||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||
|
||||
var Default = {
|
||||
interval: 5000,
|
||||
@ -581,6 +580,7 @@ var Carousel = function ($) {
|
||||
KEYDOWN: 'keydown' + EVENT_KEY,
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
||||
TOUCHEND: 'touchend' + EVENT_KEY,
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
@ -623,6 +623,8 @@ var Carousel = function ($) {
|
||||
this._isPaused = false;
|
||||
this._isSliding = false;
|
||||
|
||||
this.touchTimeout = null;
|
||||
|
||||
this._config = this._getConfig(config);
|
||||
this._element = $(element)[0];
|
||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
||||
@ -742,12 +744,30 @@ var Carousel = function ($) {
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
|
||||
if (this._config.pause === 'hover') {
|
||||
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||
return _this4.pause(event);
|
||||
}).on(Event.MOUSELEAVE, function (event) {
|
||||
return _this4.cycle(event);
|
||||
});
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
// if it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
// would stop cycling until user tapped out of it;
|
||||
// here, we listen for touchend, explicitly pause the carousel
|
||||
// (as if it's the second time we tap on it, mouseenter compat event
|
||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||
// events to fire) we explicitly restart cycling
|
||||
$(this._element).on(Event.TOUCHEND, function () {
|
||||
_this4.pause();
|
||||
if (_this4.touchTimeout) {
|
||||
clearTimeout(_this4.touchTimeout);
|
||||
}
|
||||
_this4.touchTimeout = setTimeout(function (event) {
|
||||
return _this4.cycle(event);
|
||||
}, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -1463,7 +1483,7 @@ var Dropdown = function ($) {
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
||||
$('body').children().on('mouseover', '*', $.noop);
|
||||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this.focus();
|
||||
@ -1537,7 +1557,7 @@ var Dropdown = function ($) {
|
||||
// if this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().off('mouseover', '*', $.noop);
|
||||
$('body').children().off('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
@ -3041,6 +3061,14 @@ var Tooltip = function ($) {
|
||||
|
||||
$(tip).addClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
var prevHoverState = _this23._hoverState;
|
||||
_this23._hoverState = null;
|
||||
@ -3089,6 +3117,12 @@ var Tooltip = function ($) {
|
||||
|
||||
$(tip).removeClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().off('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this._activeTrigger[Trigger.CLICK] = false;
|
||||
this._activeTrigger[Trigger.FOCUS] = false;
|
||||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
@ -3593,4 +3627,5 @@ var Popover = function ($) {
|
||||
return Popover;
|
||||
}(jQuery);
|
||||
|
||||
}();
|
||||
|
||||
})()
|
4
dist/js/bootstrap.min.js
vendored
4
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/css/docs.min.css
vendored
2
docs/assets/css/docs.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4078,6 +4078,7 @@ tbody.collapse.show {
|
||||
|
||||
.card-title {
|
||||
margin-bottom: 0.75rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.card-subtitle {
|
||||
|
2
docs/dist/css/bootstrap.css.map
vendored
2
docs/dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css
vendored
2
docs/dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css.map
vendored
2
docs/dist/css/bootstrap.min.css.map
vendored
File diff suppressed because one or more lines are too long
@ -8,16 +8,14 @@ if (typeof jQuery === 'undefined') {
|
||||
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
|
||||
}
|
||||
|
||||
+function ($) {
|
||||
(function ($) {
|
||||
var version = $.fn.jquery.split(' ')[0].split('.')
|
||||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
|
||||
}
|
||||
}(jQuery);
|
||||
|
||||
|
||||
+function () {
|
||||
})(jQuery);
|
||||
|
||||
(function () {
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
@ -551,6 +549,7 @@ var Carousel = function ($) {
|
||||
var TRANSITION_DURATION = 600;
|
||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||
|
||||
var Default = {
|
||||
interval: 5000,
|
||||
@ -581,6 +580,7 @@ var Carousel = function ($) {
|
||||
KEYDOWN: 'keydown' + EVENT_KEY,
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
||||
TOUCHEND: 'touchend' + EVENT_KEY,
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
@ -623,6 +623,8 @@ var Carousel = function ($) {
|
||||
this._isPaused = false;
|
||||
this._isSliding = false;
|
||||
|
||||
this.touchTimeout = null;
|
||||
|
||||
this._config = this._getConfig(config);
|
||||
this._element = $(element)[0];
|
||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
||||
@ -742,12 +744,30 @@ var Carousel = function ($) {
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
|
||||
if (this._config.pause === 'hover') {
|
||||
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||
return _this4.pause(event);
|
||||
}).on(Event.MOUSELEAVE, function (event) {
|
||||
return _this4.cycle(event);
|
||||
});
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
// if it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
// would stop cycling until user tapped out of it;
|
||||
// here, we listen for touchend, explicitly pause the carousel
|
||||
// (as if it's the second time we tap on it, mouseenter compat event
|
||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||
// events to fire) we explicitly restart cycling
|
||||
$(this._element).on(Event.TOUCHEND, function () {
|
||||
_this4.pause();
|
||||
if (_this4.touchTimeout) {
|
||||
clearTimeout(_this4.touchTimeout);
|
||||
}
|
||||
_this4.touchTimeout = setTimeout(function (event) {
|
||||
return _this4.cycle(event);
|
||||
}, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -1463,7 +1483,7 @@ var Dropdown = function ($) {
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
||||
$('body').children().on('mouseover', '*', $.noop);
|
||||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this.focus();
|
||||
@ -1537,7 +1557,7 @@ var Dropdown = function ($) {
|
||||
// if this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().off('mouseover', '*', $.noop);
|
||||
$('body').children().off('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
@ -3041,6 +3061,14 @@ var Tooltip = function ($) {
|
||||
|
||||
$(tip).addClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
var prevHoverState = _this23._hoverState;
|
||||
_this23._hoverState = null;
|
||||
@ -3089,6 +3117,12 @@ var Tooltip = function ($) {
|
||||
|
||||
$(tip).removeClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().off('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this._activeTrigger[Trigger.CLICK] = false;
|
||||
this._activeTrigger[Trigger.FOCUS] = false;
|
||||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
@ -3593,4 +3627,5 @@ var Popover = function ($) {
|
||||
return Popover;
|
||||
}(jQuery);
|
||||
|
||||
}();
|
||||
|
||||
})()
|
4
docs/dist/js/bootstrap.min.js
vendored
4
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
24
js/dist/carousel.js
vendored
24
js/dist/carousel.js
vendored
@ -28,6 +28,7 @@ var Carousel = function ($) {
|
||||
var TRANSITION_DURATION = 600;
|
||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||
|
||||
var Default = {
|
||||
interval: 5000,
|
||||
@ -58,6 +59,7 @@ var Carousel = function ($) {
|
||||
KEYDOWN: 'keydown' + EVENT_KEY,
|
||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
||||
TOUCHEND: 'touchend' + EVENT_KEY,
|
||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
@ -100,6 +102,8 @@ var Carousel = function ($) {
|
||||
this._isPaused = false;
|
||||
this._isSliding = false;
|
||||
|
||||
this.touchTimeout = null;
|
||||
|
||||
this._config = this._getConfig(config);
|
||||
this._element = $(element)[0];
|
||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
||||
@ -219,12 +223,30 @@ var Carousel = function ($) {
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
|
||||
if (this._config.pause === 'hover') {
|
||||
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||
return _this2.pause(event);
|
||||
}).on(Event.MOUSELEAVE, function (event) {
|
||||
return _this2.cycle(event);
|
||||
});
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
// if it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
// would stop cycling until user tapped out of it;
|
||||
// here, we listen for touchend, explicitly pause the carousel
|
||||
// (as if it's the second time we tap on it, mouseenter compat event
|
||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||
// events to fire) we explicitly restart cycling
|
||||
$(this._element).on(Event.TOUCHEND, function () {
|
||||
_this2.pause();
|
||||
if (_this2.touchTimeout) {
|
||||
clearTimeout(_this2.touchTimeout);
|
||||
}
|
||||
_this2.touchTimeout = setTimeout(function (event) {
|
||||
return _this2.cycle(event);
|
||||
}, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
2
js/dist/carousel.js.map
vendored
2
js/dist/carousel.js.map
vendored
File diff suppressed because one or more lines are too long
4
js/dist/dropdown.js
vendored
4
js/dist/dropdown.js
vendored
@ -104,7 +104,7 @@ var Dropdown = function ($) {
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
||||
$('body').children().on('mouseover', '*', $.noop);
|
||||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this.focus();
|
||||
@ -178,7 +178,7 @@ var Dropdown = function ($) {
|
||||
// if this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().off('mouseover', '*', $.noop);
|
||||
$('body').children().off('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
|
2
js/dist/dropdown.js.map
vendored
2
js/dist/dropdown.js.map
vendored
File diff suppressed because one or more lines are too long
14
js/dist/tooltip.js
vendored
14
js/dist/tooltip.js
vendored
@ -264,6 +264,14 @@ var Tooltip = function ($) {
|
||||
|
||||
$(tip).addClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
var prevHoverState = _this._hoverState;
|
||||
_this._hoverState = null;
|
||||
@ -312,6 +320,12 @@ var Tooltip = function ($) {
|
||||
|
||||
$(tip).removeClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$('body').children().off('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this._activeTrigger[Trigger.CLICK] = false;
|
||||
this._activeTrigger[Trigger.FOCUS] = false;
|
||||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
|
2
js/dist/tooltip.js.map
vendored
2
js/dist/tooltip.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user