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

Popover should appear on load when popover-is-open="true" #4264

Closed
csymeonides opened this issue Aug 24, 2015 · 13 comments
Closed

Popover should appear on load when popover-is-open="true" #4264

csymeonides opened this issue Aug 24, 2015 · 13 comments

Comments

@csymeonides
Copy link

Trying to make a popover appear as soon as page loads. It seemed like this can be achieved by setting popover-is-open="true" but it doesn't work. Plunker

@icfantv
Copy link
Contributor

icfantv commented Aug 24, 2015

@csymeonides
Copy link
Author

Thanks for clarifying - any idea if there's a temporary workaround?

@icfantv
Copy link
Contributor

icfantv commented Aug 24, 2015

I just remembered that we fixed this for #590 via #4179. Try using the master branch in your plunker and not the 0.13.3 release.

@icfantv
Copy link
Contributor

icfantv commented Aug 24, 2015

Yea, this is fixed in the 0.13.4-SNAPSHOT and will be released soon. See this plunker for the code.

@csymeonides
Copy link
Author

Excellent thank you!

@jikkujj
Copy link

jikkujj commented Oct 1, 2015

Doesnt look like this issue ie pop-over/tooltip not opening on load is fixed in 0.13.4. Have the changes from 0.13.4-SNAPSHOT not been included in 0.13.4 ?
http://plnkr.co/edit/A38xRnjhaCMW97f2uh4Q?p=preview

@icfantv
Copy link
Contributor

icfantv commented Oct 1, 2015

@jikkujj - that's because *-is-open, by design, expects an expression (otherwise, it's not [and can't be] programmatic) and you're passing it a string. in your plunker, in the PopoverDemoCtrl controller, set $scope.openOnLoad = true; and then in the HTML, say popover-is-open="openOnLoad" and you will see that it works.

@jikkujj
Copy link

jikkujj commented Oct 1, 2015

But true is an expression isnt it?

What i mean is that there should be a difference between "true" and "'true'"

@icfantv
Copy link
Contributor

icfantv commented Oct 1, 2015

It all depends on context and how it's used: true by itself is a boolean. "true", 'true', and "'true'" are all strings in this context because they are attributes and the $parse service expects an expression. Thus, there's no assign function because there's nothing to evaluate.

Here's what we are doing.

The thing to remember is this attribute was added to allow people to programmatically control whether or not a popover or tooltip would display. Even if we allowed the user to hard-code a boolean true value, there's no way to change it - at least, not very easily.

What problem are you trying to solve whereby you want to just put the string value of a boolean in there and have it magically work?

@nadyav
Copy link

nadyav commented Apr 5, 2016

@icfantv, but isn't it the same as passing "true"? Adding $scope.openOnLoad = true; in the controller and then popover-is-open="openOnLoad" in the view doesn't make the popover show on page load. The effect is exactly the same as popover-is-open="true". Thank you.

@nadyav
Copy link

nadyav commented Apr 6, 2016

It's said on https://angular-ui.github.io/bootstrap/ "For any non-supported value, the trigger will be used to both show and hide the popover. Using the 'none' trigger will disable the internal trigger(s), one can then use the popover-is-open attribute exclusively to show and hide the popover.", but adding popover-trigger="none" to the above code doesn't help as well. Popover just doesn't get displayed at all.

@icfantv
Copy link
Contributor

icfantv commented Apr 6, 2016

@nadyav, I'm on mobile at the moment. Can you please file a complete and new issue documenting the issue you think is a bug, complete with a minimally wor minting plunker and we will investigate. Please make sure you adhere to the issue template fully and use the latest versions of the requisite libraries in your reproduction. Also please link this issue in your new one. thanks.

@nadyav
Copy link

nadyav commented Apr 10, 2016

@icfantv, I have created a new issue here #5773. Perhaps, there is no bug, and I'm using settings incorrectly, but any help is highly appreciated. Thank you very much in advance.

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

4 participants