Commit a93a753c authored by fat's avatar fat
Browse files

fixes #10134 – dont use jquery offset directly because it uses sub pixel rendering

parent fe7fffe0
No related merge requests found
Showing with 26 additions and 8 deletions
+26 -8
...@@ -1201,9 +1201,18 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery" ...@@ -1201,9 +1201,18 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
offset.top = offset.top + marginTop offset.top = offset.top + marginTop
offset.left = offset.left + marginLeft offset.left = offset.left + marginLeft
$tip // $.fn.offset doesn't round pixel values
.offset(offset) // so we use setOffset directly with our own function B-0
.addClass('in') 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 // check to see if placing tip in new offset caused the tip to resize itself
var actualWidth = $tip[0].offsetWidth var actualWidth = $tip[0].offsetWidth
......
This diff is collapsed.
This diff is collapsed.
...@@ -199,9 +199,18 @@ ...@@ -199,9 +199,18 @@
offset.top = offset.top + marginTop offset.top = offset.top + marginTop
offset.left = offset.left + marginLeft offset.left = offset.left + marginLeft
$tip // $.fn.offset doesn't round pixel values
.offset(offset) // so we use setOffset directly with our own function B-0
.addClass('in') 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 // check to see if placing tip in new offset caused the tip to resize itself
var actualWidth = $tip[0].offsetWidth var actualWidth = $tip[0].offsetWidth
......
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