Skip to content

Commit

Permalink
fixes #10134 – dont use jquery offset directly because it uses sub pi…
Browse files Browse the repository at this point in the history
…xel rendering
  • Loading branch information
fat committed Dec 24, 2013
1 parent fe7fffe commit a93a753
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
15 changes: 12 additions & 3 deletions dist/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1201,9 +1201,18 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
offset.top = offset.top + marginTop
offset.left = offset.left + marginLeft

$tip
.offset(offset)
.addClass('in')
// $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0
jQuery.offset.setOffset($tip[0], $.extend({
using: function (props) {
$tip.css({
top: Math.round(props.top),
left: Math.round(props.left)
})
}
}, offset), 0)

$tip.addClass('in')

// check to see if placing tip in new offset caused the tip to resize itself
var actualWidth = $tip[0].offsetWidth
Expand Down
Loading

0 comments on commit a93a753

Please sign in to comment.