Skip to content

Commit 898f688

Browse files
committed
Only append bar to the first body element
In the case where one is using an svg diagram with a foreign object element which contains it's own self-contained html DOM, the progress bar was being applied to all of them. Resulting in many loading bars. This patch restricts the selector to only find one element, which will the first.
1 parent 44fbda5 commit 898f688

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/loading-bar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ angular.module('cfp.loadingBar', [])
181181
$animate = $injector.get('$animate');
182182
}
183183

184-
var $parent = $document.find($parentSelector);
184+
var $parent = $document.find($parentSelector).eq(0);
185185
$timeout.cancel(completeTimeout);
186186

187187
// do not continually broadcast the started event:

0 commit comments

Comments
 (0)