Fixes Tooltip/popover "in" inside placement error 2.2.2
Created by: thelonecabbage
position for the tooltip/popover is calculated correctly for position:'in right', but the element is not placed correctly for mouseover to keep the window open.
also, offset presents non-relative positioning, it was switched to simple css({})
--- /home/justin/workspace/bootstrap/js/bootstrap-tooltip.js
+++ /home/justin/workspace/niche/etzly/app/webroot/vendor/bootstrap/js/bootstrap-tooltip.js
@@ -120,9 +120,13 @@
$tip
.detach()
- .css({ top: 0, left: 0, display: 'block' })
- .insertAfter(this.$element)
-
+ .css({ top: 0, left: 0, display: 'block' });
+
+ if (inside) {
+ this.$element.append($tip);
+ } else {
+ $tip.insertAfter(this.$element)
+ }
pos = this.getPosition(inside)
actualWidth = $tip[0].offsetWidth
@@ -143,8 +147,15 @@
break
}
+ if (inside) {
+ $tip.css(tp);
+ } else {
+ $tip.offset(tp);
+ }
+
$tip
- .offset(tp)
+ //.offset(tp)
+ //css(tp)
.addClass(placement)
.addClass('in')
}