Commit feed9aed authored by Mark Otto's avatar Mark Otto
Browse files

Fixes #13202: Always use overflow: auto; on .table-responsive to prevent...

Fixes #13202: Always use overflow: auto; on .table-responsive to prevent content breaking out of containers
parent 557d3e52
Showing with 62 additions and 31 deletions
+62 -31
...@@ -2244,11 +2244,13 @@ table th[class*="col-"] { ...@@ -2244,11 +2244,13 @@ table th[class*="col-"] {
.table-hover > tbody > tr.danger:hover > th { .table-hover > tbody > tr.danger:hover > th {
background-color: #ebcccc; background-color: #ebcccc;
} }
.table-responsive {
overflow-x: auto;
}
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.table-responsive { .table-responsive {
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar; -ms-overflow-style: -ms-autohiding-scrollbar;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -88,6 +88,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -88,6 +88,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Alert.VERSION = '3.2.0' Alert.VERSION = '3.2.0'
Alert.TRANSITION_DURATION = 150
Alert.prototype.close = function (e) { Alert.prototype.close = function (e) {
var $this = $(this) var $this = $(this)
var selector = $this.attr('data-target') var selector = $this.attr('data-target')
...@@ -119,7 +121,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -119,7 +121,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && $parent.hasClass('fade') ? $.support.transition && $parent.hasClass('fade') ?
$parent $parent
.one('bsTransitionEnd', removeElement) .one('bsTransitionEnd', removeElement)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
removeElement() removeElement()
} }
...@@ -306,6 +308,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -306,6 +308,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Carousel.VERSION = '3.2.0' Carousel.VERSION = '3.2.0'
Carousel.TRANSITION_DURATION = 600
Carousel.DEFAULTS = { Carousel.DEFAULTS = {
interval: 5000, interval: 5000,
pause: 'hover', pause: 'hover',
...@@ -429,7 +433,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -429,7 +433,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
that.$element.trigger(slidEvent) that.$element.trigger(slidEvent)
}, 0) }, 0)
}) })
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
} else { } else {
$active.removeClass('active') $active.removeClass('active')
$next.addClass('active') $next.addClass('active')
...@@ -531,6 +535,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -531,6 +535,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Collapse.VERSION = '3.2.0' Collapse.VERSION = '3.2.0'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = { Collapse.DEFAULTS = {
toggle: true toggle: true
} }
...@@ -579,7 +585,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -579,7 +585,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.$element this.$element
.one('bsTransitionEnd', $.proxy(complete, this)) .one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
} }
Collapse.prototype.hide = function () { Collapse.prototype.hide = function () {
...@@ -612,7 +618,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -612,7 +618,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.$element this.$element
[dimension](0) [dimension](0)
.one('bsTransitionEnd', $.proxy(complete, this)) .one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350) .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
} }
Collapse.prototype.toggle = function () { Collapse.prototype.toggle = function () {
...@@ -869,6 +875,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -869,6 +875,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Modal.VERSION = '3.2.0' Modal.VERSION = '3.2.0'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Modal.DEFAULTS = { Modal.DEFAULTS = {
backdrop: true, backdrop: true,
keyboard: true, keyboard: true,
...@@ -925,7 +934,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -925,7 +934,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
.one('bsTransitionEnd', function () { .one('bsTransitionEnd', function () {
that.$element.trigger('focus').trigger(e) that.$element.trigger('focus').trigger(e)
}) })
.emulateTransitionEnd(300) : .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
that.$element.trigger('focus').trigger(e) that.$element.trigger('focus').trigger(e)
}) })
} }
...@@ -956,7 +965,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -956,7 +965,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && this.$element.hasClass('fade') ? $.support.transition && this.$element.hasClass('fade') ?
this.$element this.$element
.one('bsTransitionEnd', $.proxy(this.hideModal, this)) .one('bsTransitionEnd', $.proxy(this.hideModal, this))
.emulateTransitionEnd(300) : .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
this.hideModal() this.hideModal()
} }
...@@ -1019,7 +1028,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1019,7 +1028,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
doAnimate ? doAnimate ?
this.$backdrop this.$backdrop
.one('bsTransitionEnd', callback) .one('bsTransitionEnd', callback)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callback() callback()
} else if (!this.isShown && this.$backdrop) { } else if (!this.isShown && this.$backdrop) {
...@@ -1032,7 +1041,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1032,7 +1041,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && this.$element.hasClass('fade') ? $.support.transition && this.$element.hasClass('fade') ?
this.$backdrop this.$backdrop
.one('bsTransitionEnd', callbackRemove) .one('bsTransitionEnd', callbackRemove)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callbackRemove() callbackRemove()
} else if (callback) { } else if (callback) {
...@@ -1145,6 +1154,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1145,6 +1154,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Tooltip.VERSION = '3.2.0' Tooltip.VERSION = '3.2.0'
Tooltip.TRANSITION_DURATION = 150
Tooltip.DEFAULTS = { Tooltip.DEFAULTS = {
animation: true, animation: true,
placement: 'top', placement: 'top',
...@@ -1325,7 +1336,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1325,7 +1336,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && this.$tip.hasClass('fade') ? $.support.transition && this.$tip.hasClass('fade') ?
$tip $tip
.one('bsTransitionEnd', complete) .one('bsTransitionEnd', complete)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
complete() complete()
} }
} }
...@@ -1413,7 +1424,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1413,7 +1424,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && this.$tip.hasClass('fade') ? $.support.transition && this.$tip.hasClass('fade') ?
$tip $tip
.one('bsTransitionEnd', complete) .one('bsTransitionEnd', complete)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
complete() complete()
this.hoverState = null this.hoverState = null
...@@ -1887,6 +1898,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1887,6 +1898,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Tab.VERSION = '3.2.0' Tab.VERSION = '3.2.0'
Tab.TRANSITION_DURATION = 150
Tab.prototype.show = function () { Tab.prototype.show = function () {
var $this = this.element var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)') var $ul = $this.closest('ul:not(.dropdown-menu)')
...@@ -1950,7 +1963,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1950,7 +1963,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$active.length && transition ? $active.length && transition ?
$active $active
.one('bsTransitionEnd', next) .one('bsTransitionEnd', next)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
next() next()
$active.removeClass('in') $active.removeClass('in')
......
This diff is collapsed.
...@@ -2244,11 +2244,13 @@ table th[class*="col-"] { ...@@ -2244,11 +2244,13 @@ table th[class*="col-"] {
.table-hover > tbody > tr.danger:hover > th { .table-hover > tbody > tr.danger:hover > th {
background-color: #ebcccc; background-color: #ebcccc;
} }
.table-responsive {
overflow-x: auto;
}
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
.table-responsive { .table-responsive {
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
-ms-overflow-style: -ms-autohiding-scrollbar; -ms-overflow-style: -ms-autohiding-scrollbar;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -88,6 +88,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -88,6 +88,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Alert.VERSION = '3.2.0' Alert.VERSION = '3.2.0'
Alert.TRANSITION_DURATION = 150
Alert.prototype.close = function (e) { Alert.prototype.close = function (e) {
var $this = $(this) var $this = $(this)
var selector = $this.attr('data-target') var selector = $this.attr('data-target')
...@@ -119,7 +121,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -119,7 +121,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && $parent.hasClass('fade') ? $.support.transition && $parent.hasClass('fade') ?
$parent $parent
.one('bsTransitionEnd', removeElement) .one('bsTransitionEnd', removeElement)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
removeElement() removeElement()
} }
...@@ -306,6 +308,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -306,6 +308,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Carousel.VERSION = '3.2.0' Carousel.VERSION = '3.2.0'
Carousel.TRANSITION_DURATION = 600
Carousel.DEFAULTS = { Carousel.DEFAULTS = {
interval: 5000, interval: 5000,
pause: 'hover', pause: 'hover',
...@@ -429,7 +433,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -429,7 +433,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
that.$element.trigger(slidEvent) that.$element.trigger(slidEvent)
}, 0) }, 0)
}) })
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
} else { } else {
$active.removeClass('active') $active.removeClass('active')
$next.addClass('active') $next.addClass('active')
...@@ -531,6 +535,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -531,6 +535,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Collapse.VERSION = '3.2.0' Collapse.VERSION = '3.2.0'
Collapse.TRANSITION_DURATION = 350
Collapse.DEFAULTS = { Collapse.DEFAULTS = {
toggle: true toggle: true
} }
...@@ -579,7 +585,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -579,7 +585,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.$element this.$element
.one('bsTransitionEnd', $.proxy(complete, this)) .one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
} }
Collapse.prototype.hide = function () { Collapse.prototype.hide = function () {
...@@ -612,7 +618,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -612,7 +618,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
this.$element this.$element
[dimension](0) [dimension](0)
.one('bsTransitionEnd', $.proxy(complete, this)) .one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350) .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
} }
Collapse.prototype.toggle = function () { Collapse.prototype.toggle = function () {
...@@ -869,6 +875,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -869,6 +875,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Modal.VERSION = '3.2.0' Modal.VERSION = '3.2.0'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Modal.DEFAULTS = { Modal.DEFAULTS = {
backdrop: true, backdrop: true,
keyboard: true, keyboard: true,
...@@ -925,7 +934,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -925,7 +934,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
.one('bsTransitionEnd', function () { .one('bsTransitionEnd', function () {
that.$element.trigger('focus').trigger(e) that.$element.trigger('focus').trigger(e)
}) })
.emulateTransitionEnd(300) : .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
that.$element.trigger('focus').trigger(e) that.$element.trigger('focus').trigger(e)
}) })
} }
...@@ -956,7 +965,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -956,7 +965,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && this.$element.hasClass('fade') ? $.support.transition && this.$element.hasClass('fade') ?
this.$element this.$element
.one('bsTransitionEnd', $.proxy(this.hideModal, this)) .one('bsTransitionEnd', $.proxy(this.hideModal, this))
.emulateTransitionEnd(300) : .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
this.hideModal() this.hideModal()
} }
...@@ -1019,7 +1028,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1019,7 +1028,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
doAnimate ? doAnimate ?
this.$backdrop this.$backdrop
.one('bsTransitionEnd', callback) .one('bsTransitionEnd', callback)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callback() callback()
} else if (!this.isShown && this.$backdrop) { } else if (!this.isShown && this.$backdrop) {
...@@ -1032,7 +1041,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1032,7 +1041,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && this.$element.hasClass('fade') ? $.support.transition && this.$element.hasClass('fade') ?
this.$backdrop this.$backdrop
.one('bsTransitionEnd', callbackRemove) .one('bsTransitionEnd', callbackRemove)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
callbackRemove() callbackRemove()
} else if (callback) { } else if (callback) {
...@@ -1145,6 +1154,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1145,6 +1154,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Tooltip.VERSION = '3.2.0' Tooltip.VERSION = '3.2.0'
Tooltip.TRANSITION_DURATION = 150
Tooltip.DEFAULTS = { Tooltip.DEFAULTS = {
animation: true, animation: true,
placement: 'top', placement: 'top',
...@@ -1325,7 +1336,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1325,7 +1336,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && this.$tip.hasClass('fade') ? $.support.transition && this.$tip.hasClass('fade') ?
$tip $tip
.one('bsTransitionEnd', complete) .one('bsTransitionEnd', complete)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
complete() complete()
} }
} }
...@@ -1413,7 +1424,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1413,7 +1424,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$.support.transition && this.$tip.hasClass('fade') ? $.support.transition && this.$tip.hasClass('fade') ?
$tip $tip
.one('bsTransitionEnd', complete) .one('bsTransitionEnd', complete)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
complete() complete()
this.hoverState = null this.hoverState = null
...@@ -1887,6 +1898,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1887,6 +1898,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Tab.VERSION = '3.2.0' Tab.VERSION = '3.2.0'
Tab.TRANSITION_DURATION = 150
Tab.prototype.show = function () { Tab.prototype.show = function () {
var $this = this.element var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)') var $ul = $this.closest('ul:not(.dropdown-menu)')
...@@ -1950,7 +1963,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -1950,7 +1963,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
$active.length && transition ? $active.length && transition ?
$active $active
.one('bsTransitionEnd', next) .one('bsTransitionEnd', next)
.emulateTransitionEnd(150) : .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
next() next()
$active.removeClass('in') $active.removeClass('in')
......
This diff is collapsed.
...@@ -169,11 +169,12 @@ table { ...@@ -169,11 +169,12 @@ table {
// will display normally. // will display normally.
.table-responsive { .table-responsive {
overflow-x: auto;
@media screen and (max-width: @screen-xs-max) { @media screen and (max-width: @screen-xs-max) {
width: 100%; width: 100%;
margin-bottom: (@line-height-computed * 0.75); margin-bottom: (@line-height-computed * 0.75);
overflow-y: hidden; overflow-y: hidden;
overflow-x: auto;
-ms-overflow-style: -ms-autohiding-scrollbar; -ms-overflow-style: -ms-autohiding-scrollbar;
border: 1px solid @table-border-color; border: 1px solid @table-border-color;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment