bug when tooltip template has text (e.g. new line character) in between <div>s
Created by: stelovsky
When there is text in tooltip 'template' option (e.g. new line character), a bug is reported in jQuery. Tracing the bug leads to Tooltip.prototype.applyPlacement where on line 1500 $tip.offset(offset) is called and $tip contains 'text' nodes (which don't have offset, or at least ownerDocument.defaultView.getComputedStyle( elem, null ) doesn't want 'elem' to be 'text' when 'ownerDocument' is #document):
$tip: jQuery.fn.init[7] 0: div#tooltip981716.tooltip.fade.bottom.in 1: text 2: div#tooltip981716.tooltip-arrow.fade.bottom.in 3: text 4: div#tooltip981716.tooltip-inner.fade.bottom.in 5: text 6: div#tooltip981716.fade.bottom.in length: 7 ....
This is the error message:
The best would be to skip the text elements or at least the documentation of Tooltip should state that not even eonls are allowed in between the <div>
s