Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Tooltip broken in angularJS 1.3.1+, works in 1.3.0 #2965

Closed
icfantv opened this issue Nov 13, 2014 · 13 comments
Closed

Tooltip broken in angularJS 1.3.1+, works in 1.3.0 #2965

icfantv opened this issue Nov 13, 2014 · 13 comments
Milestone

Comments

@icfantv
Copy link
Contributor

icfantv commented Nov 13, 2014

Looks like a change in angular from 1.3.0 to 1.3.1 breaks tooltips. Here's the plunker: http://plnkr.co/edit/Iomdzv58NWmL9ZHLeDCJ

It's currently in the broken state. Change 1.3.1 to 1.3.0 for angular.js in the and it works again.

@bkmartinjr
Copy link

I suspect this is the same issue that cause popovers to stop working in angular >=1.3.1. Example: click me With the latest release, clicking on the button fails to show the popover.

For popovers, the issue is that event listeners are not being bound. Root cause is a change in the implementation of $compile.directive.Attributes.$observe. The old implementation would always call the observer function once, and the tooltip/popover directive code assumes this. The new $observe only calls the observer function if the attribute is present on the element.

Temporary work around is simple: you must explicitly specify the trigger (and position) even when using the default. So the above popover will work if you code it as: click me

I bet tooltips have the same issue.

Long term, code in $tooltip() factory (ui-bootstrap.js and ui-bootstrap-tpls.js) likely needs to change.

@scrapoxy
Copy link

+1

@bealtine
Copy link

ran into this just now too:(
just an FYI : http://plnkr.co/edit/It08OgCgH0wW2yQBIiVG?p=preview

@icfantv
Copy link
Contributor Author

icfantv commented Nov 13, 2014

@bkmartinjr, i'm having trouble understanding your workaround. i've added tooltip-placement="top" and tooltip-trigger="focus" to my element and it's still not working.

@scrapoxy
Copy link

It works for popover with -placement, -append-to-body, -trigger
BUT it doesnt work for tooltip.

@bkmartinjr
Copy link

It works for tooltip if you specify tooltip-trigger and tooltip-placement

If you omit either of these, it will not work.

On Thu, Nov 13, 2014 at 9:59 AM, Fabien Vauchelles <[email protected]

wrote:

It works for popover with -placement, -append-to-body, -trigger
BUT it doesnt work for tooltip.


Reply to this email directly or view it on GitHub
#2965 (comment)
.

Bruce Martin
(c) 650-283-4736

@icfantv
Copy link
Contributor Author

icfantv commented Nov 13, 2014

@bkmartinjr, are you sure? i tried that in my plunkr and it's still not working. i also had the tooltip attribute defined - for the record.

i'm also using ui-bootstrap .11.2 and bootstrap 3.3

here's the new plunkr: http://plnkr.co/edit/5QDrA5GVLbCTJFiksEs8

@bkmartinjr
Copy link

I just modified your plunkr -- added the two missing attributes -- and
everything works for me:

http://plnkr.co/edit/8wgIgYjfvs3rIqBQNuoY?p=preview

On Thu, Nov 13, 2014 at 10:35 AM, icfantv [email protected] wrote:

@bkmartinjr https://github.com/bkmartinjr, are you sure? i tried that
in my plunkr and it's still not working. i also had the tooltip attribute
defined - for the record.


Reply to this email directly or view it on GitHub
#2965 (comment)
.

Bruce Martin
(c) 650-283-4736

@icfantv
Copy link
Contributor Author

icfantv commented Nov 13, 2014

@bkmartinjr, gah! wrong event. i can never remember that focus isn't mouse. thanks.

@alexbyk
Copy link

alexbyk commented Nov 13, 2014

#2959

@chrisirhc
Copy link
Contributor

This should already be fixed on master.

@chrisirhc chrisirhc added this to the 0.12 milestone Nov 14, 2014
@johnmckay-reward
Copy link

The title of this issue implies that the tooltip works on 1.3.0, but not on 1.3.1, I can't get it working on 1.3.0 either, highest I can go is 1.2.20

@chrisirhc
Copy link
Contributor

Closed via 32c4704

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants