Commit 5713bd74 authored by Mark Otto's avatar Mark Otto

Fixes #12669 again: Redeclare the line-heights again for date inputs in IE8+

parent 912c4bcb
...@@ -2408,12 +2408,14 @@ input[type="time"].input-sm, ...@@ -2408,12 +2408,14 @@ input[type="time"].input-sm,
input[type="datetime-local"].input-sm, input[type="datetime-local"].input-sm,
input[type="month"].input-sm { input[type="month"].input-sm {
line-height: 30px; line-height: 30px;
line-height: 1.5 \0;
} }
input[type="date"].input-lg, input[type="date"].input-lg,
input[type="time"].input-lg, input[type="time"].input-lg,
input[type="datetime-local"].input-lg, input[type="datetime-local"].input-lg,
input[type="month"].input-lg { input[type="month"].input-lg {
line-height: 46px; line-height: 46px;
line-height: 1.33 \0;
} }
.form-group { .form-group {
margin-bottom: 15px; margin-bottom: 15px;
......
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -712,7 +712,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -712,7 +712,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
$this.trigger('focus') $this
.trigger('focus')
.attr('aria-expanded', 'true')
$parent $parent
.toggleClass('open') .toggleClass('open')
...@@ -758,11 +760,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -758,11 +760,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (e && e.which === 3) return if (e && e.which === 3) return
$(backdrop).remove() $(backdrop).remove()
$(toggle).each(function () { $(toggle).each(function () {
var $parent = getParent($(this)) var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this } var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
}) })
} }
...@@ -2019,6 +2027,28 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -2019,6 +2027,28 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
target: window target: window
} }
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var targetHeight = this.$target.height()
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
if (this.affixed == 'bottom') {
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
}
var initializing = this.affixed == null
var colliderTop = initializing ? scrollTop : position.top
var colliderHeight = initializing ? targetHeight : height
if (offsetTop != null && colliderTop <= offsetTop) return 'top'
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
return false
}
Affix.prototype.getPinnedOffset = function () { Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix') this.$element.removeClass(Affix.RESET).addClass('affix')
...@@ -2034,42 +2064,40 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -2034,42 +2064,40 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Affix.prototype.checkPosition = function () { Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height() var height = this.$element.height()
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var offset = this.options.offset var offset = this.options.offset
var offsetTop = offset.top var offsetTop = offset.top
var offsetBottom = offset.bottom var offsetBottom = offset.bottom
var scrollHeight = $('body').height()
if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
if (this.affixed === affix) return if (this.affixed != affix) {
if (this.unpin != null) this.$element.css('top', '') if (this.unpin != null) this.$element.css('top', '')
var affixType = 'affix' + (affix ? '-' + affix : '') var affixType = 'affix' + (affix ? '-' + affix : '')
var e = $.Event(affixType + '.bs.affix') var e = $.Event(affixType + '.bs.affix')
this.$element.trigger(e) this.$element.trigger(e)
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
this.affixed = affix this.affixed = affix
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
this.$element this.$element
.removeClass(Affix.RESET) .removeClass(Affix.RESET)
.addClass(affixType) .addClass(affixType)
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix') .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
}
if (affix == 'bottom') { if (affix == 'bottom') {
this.$element.offset({ this.$element.offset({
top: scrollHeight - this.$element.height() - offsetBottom top: scrollHeight - height - offsetBottom
}) })
} }
} }
......
This diff is collapsed.
...@@ -2408,12 +2408,14 @@ input[type="time"].input-sm, ...@@ -2408,12 +2408,14 @@ input[type="time"].input-sm,
input[type="datetime-local"].input-sm, input[type="datetime-local"].input-sm,
input[type="month"].input-sm { input[type="month"].input-sm {
line-height: 30px; line-height: 30px;
line-height: 1.5 \0;
} }
input[type="date"].input-lg, input[type="date"].input-lg,
input[type="time"].input-lg, input[type="time"].input-lg,
input[type="datetime-local"].input-lg, input[type="datetime-local"].input-lg,
input[type="month"].input-lg { input[type="month"].input-lg {
line-height: 46px; line-height: 46px;
line-height: 1.33 \0;
} }
.form-group { .form-group {
margin-bottom: 15px; margin-bottom: 15px;
......
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -712,7 +712,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -712,7 +712,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
$this.trigger('focus') $this
.trigger('focus')
.attr('aria-expanded', 'true')
$parent $parent
.toggleClass('open') .toggleClass('open')
...@@ -758,11 +760,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -758,11 +760,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
if (e && e.which === 3) return if (e && e.which === 3) return
$(backdrop).remove() $(backdrop).remove()
$(toggle).each(function () { $(toggle).each(function () {
var $parent = getParent($(this)) var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this } var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return if (!$parent.hasClass('open')) return
$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
}) })
} }
...@@ -2019,6 +2027,28 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -2019,6 +2027,28 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
target: window target: window
} }
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var targetHeight = this.$target.height()
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
if (this.affixed == 'bottom') {
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
}
var initializing = this.affixed == null
var colliderTop = initializing ? scrollTop : position.top
var colliderHeight = initializing ? targetHeight : height
if (offsetTop != null && colliderTop <= offsetTop) return 'top'
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
return false
}
Affix.prototype.getPinnedOffset = function () { Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix') this.$element.removeClass(Affix.RESET).addClass('affix')
...@@ -2034,42 +2064,40 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re ...@@ -2034,42 +2064,40 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re
Affix.prototype.checkPosition = function () { Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height() var height = this.$element.height()
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var offset = this.options.offset var offset = this.options.offset
var offsetTop = offset.top var offsetTop = offset.top
var offsetBottom = offset.bottom var offsetBottom = offset.bottom
var scrollHeight = $('body').height()
if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
if (this.affixed === affix) return if (this.affixed != affix) {
if (this.unpin != null) this.$element.css('top', '') if (this.unpin != null) this.$element.css('top', '')
var affixType = 'affix' + (affix ? '-' + affix : '') var affixType = 'affix' + (affix ? '-' + affix : '')
var e = $.Event(affixType + '.bs.affix') var e = $.Event(affixType + '.bs.affix')
this.$element.trigger(e) this.$element.trigger(e)
if (e.isDefaultPrevented()) return if (e.isDefaultPrevented()) return
this.affixed = affix this.affixed = affix
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
this.$element this.$element
.removeClass(Affix.RESET) .removeClass(Affix.RESET)
.addClass(affixType) .addClass(affixType)
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix') .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
}
if (affix == 'bottom') { if (affix == 'bottom') {
this.$element.offset({ this.$element.offset({
top: scrollHeight - this.$element.height() - offsetBottom top: scrollHeight - height - offsetBottom
}) })
} }
} }
......
This diff is collapsed.
...@@ -183,9 +183,11 @@ input[type="month"] { ...@@ -183,9 +183,11 @@ input[type="month"] {
&.input-sm { &.input-sm {
line-height: @input-height-small; line-height: @input-height-small;
line-height: @line-height-small ~"\0";
} }
&.input-lg { &.input-lg {
line-height: @input-height-large; line-height: @input-height-large;
line-height: @line-height-large ~"\0";
} }
} }
......
Markdown is supported
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