Skip to content

Commit d29be43

Browse files
committed
show and hide tooltips on same event is now possible thanks to @leonard-thieu #208
1 parent 9414d77 commit d29be43

File tree

7 files changed

+23
-13
lines changed

7 files changed

+23
-13
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-tooltips",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Angular.js tooltips module.",
55
"authors": [
66
"Filippo Oretti <[email protected]",

dist/angular-tooltips.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* angular-tooltips
3-
* 1.2.0
3+
* 1.2.1
44
*
55
* Angular.js tooltips module.
66
* http://720kb.github.io/angular-tooltips
77
*
88
* MIT license
9-
* Sun May 21 2017
9+
* Tue May 23 2017
1010
*/
1111
@-webkit-keyframes animate-tooltip {
1212
0% {

dist/angular-tooltips.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* angular-tooltips
3-
* 1.2.0
3+
* 1.2.1
44
*
55
* Angular.js tooltips module.
66
* http://720kb.github.io/angular-tooltips
77
*
88
* MIT license
9-
* Sun May 21 2017
9+
* Tue May 23 2017
1010
*/
1111
/*global angular,window*/
1212
(function withAngular(angular, window) {
@@ -338,6 +338,11 @@
338338
}
339339
, onTooltipShow = function onTooltipShow(event) {
340340

341+
if (event && !tooltipElement.hasClass('active')) {
342+
343+
event.stopImmediatePropagation();
344+
}
345+
341346
tipElement.addClass('_hidden');
342347
if ($attrs.tooltipSmart) {
343348

@@ -458,7 +463,12 @@
458463
}
459464
}
460465
}
461-
, onTooltipHide = function onTooltipHide() {
466+
, onTooltipHide = function onTooltipHide(event) {
467+
468+
if (event && tooltipElement.hasClass('active')) {
469+
470+
event.stopImmediatePropagation();
471+
}
462472

463473
if ($attrs.tooltipAppendToBody) {
464474

dist/angular-tooltips.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-tooltips.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-tooltips.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-tooltips",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Angular.js tooltips module.",
55
"homepage": "http://720kb.github.io/angular-tooltips",
66
"main": "index.js",

0 commit comments

Comments
 (0)