-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Option to display only one popover at a time #749
Conversation
Added a new option for popoverMode. If set to single, only one popover will be displayed at a time. Clicking elsewhere in the body or another popover will hide the previous popover. This functionality is ideal for tablets where mouseneter and mouseleave are not ideal.
@vchatterji #692 was already fixed in master |
This reverts commit 4970ae6.
Reverted 692 changes. |
Moved the check to before link as it only needs to be executed once
Created a working plunk with this code (also checked it works with bootstrap 3): |
@vchatterji could you please squash all the commits into one - it is very hard to review it currently. As the very quick note - I'm a bit worried about the amount of code this change adds... I think it would be much easier / shorter to create a new directive ( As a general rule I would expect that this change doesn't add more than 10LOC or something... |
I will open another pull request with a single commit |
Is this feature implemented into the offical popover of angularJS? |
See issues:
#618
and
#590
This feature allows for a single popover being displayed. Any new popover will close any older popovers. Clicking on body will also close the popover. The behaviour is optional and by default the popover will retain its existing multiple display functionality.
This feature can be turned on via:
$tooltipProvider.options({ popoverMode: 'single'});