angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.3k stars 6.74k forks source link

Tooltip doesn't show up when svg's <foreignObject> elements has tag <body> #6597

Open sshelake25 opened 6 years ago

sshelake25 commented 6 years ago

Bug description: Uib Tooltip does not shows when document contains multiple 'body' tag.

Example: When page contains multiple SVG elements and SVG element's contains tag. In that case according to code it tries to to find body tag inside document and appends tooltip to it. but it fails when document contails multiple 'body' tag inside it.

if (appendToBody) { $document.find('body').append(tooltip); //it shold be angular.element(document.body).append(tooltip); } else { element.after(tooltip); }

Link to minimally-working plunker that reproduces the issue: As this issues in only producing on our enviorment. its very hard to reproduce it on plunker. As plunker removing multiple body tag. we will provide you DOM screenshot.

Steps to reproduce the issue: add 'body' tag inside SVG element. add such multiple SVG element on page. tooltip won't show when you enabled append-to-body flag to true.

Version of Angular, UIBS, and Bootstrap

Angular:1.4.4

UIBS:1.3.3

Bootstrap:3.3.5