-
Notifications
You must be signed in to change notification settings - Fork 6.7k
popover generates : Cannot read property 'split' of undefined #2927
Comments
AngularJS 1.3 support is still work in progress. Please try again with AngularJS 1.2.x. |
Hi, I ran into the same issue today and did some research. Here are my results:The issue exist only with the latest angular release which is 1.3.1 probably due this "fix" commit angular/angular.js@531a8de So now when the attribute Please note :This also affects other popup properties ( which are added to scope in $observe fn ), which can be set via angular.module('ui.bootstrap.demo')
.config(function($tooltipProvider) {
$tooltipProvider.options({
placement:'top',
popupDelay: 250,
appendToBody: true
});
}
) you have to specify all these directly via attributes: <button popover="I appeared on mouse enter!" popover-trigger="mouseenter" popover-placement="top" popover-popup-delay="250" popover-append-to-body="true" class="btn btn-default">Mouseenter</button> Please note again:This whoa, this angular fix has quite messed up things 😞 |
Hi, Thanks Hotell for information. Indeed, with angular 1.2.x it works fine. So as a workaround (and as Hotell said), instead of : <div popover="test"> prefer that : <div popover="test" popover-placement="..."> Should do the trick. Hope It can help. |
Is this still an issue? I’m trying to reproduce this in a Plunker so I can write a test and submit a PR, but I haven’t had any luck. Would someone mind writing a Plunker for this issue please? |
@chasenlehara |
+1, experiencing this issue for both tooltips and popovers (dependency on tooltips) with Angular 1.3 |
+1 Seeing this too in popovers. I can confirm that the work around is to explicitly specify the popover-placement attribute in the html and the error goes away. |
There seems to be a problem with placement/position of tooltips, and popovers. It has something to do with the changes to angular.isDefined which works differently in AngularJS 1.2 & 1.3 Here are a few directives to patch the issues by setting defaults
|
I'm not seeing this issue anymore when running against the latest master. Seems somewhere along the way the observe for the placement attribute was removed and the prepPlacement function is called whenever the tooltip is opened (showTooltipBind() -> prepareTooltip() -> prepPlacement()) which sets the scope.placement property correctly. |
Closing as already fixed. |
Hi,
I have recently updated my frameworks and libs version. I want to use popover directive but it generates and error in jquery (Cannot read property 'split' of undefined).
After debugging I found that problem comes from this line in angular-ui :
This line is call here :
So I searched for scope.tt_placement which seems to be the root problem.
I found that this variable is only set here :
So we observe placement attritube to set scope.tt_placement.
To fix the error I was obliged to set popover-placement and it works fine.
Is it a normal behavior ? In examples I saw some popover without this attribute.
Is it a bug or a documentation/code alignment problem?
In any cases, thanks for your work ;)
Version :
The text was updated successfully, but these errors were encountered: