Skip to content

Commit a748cd2

Browse files
Kevin Dewtipiirai
authored andcommitted
Moved timer locations since they are not related to the conditional
1 parent 4ce9872 commit a748cd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tooltip/tooltip.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@
139139

140140
// trigger --> show
141141
trigger.bind(evt[0], function(e) {
142+
clearTimeout(timer);
142143
if (conf.predelay) {
143-
clearTimeout(timer);
144144
pretimer = setTimeout(function() { self.show(e); }, conf.predelay);
145145

146146
} else {
@@ -149,8 +149,8 @@
149149

150150
// trigger --> hide
151151
}).bind(evt[1], function(e) {
152+
clearTimeout(pretimer);
152153
if (conf.delay) {
153-
clearTimeout(pretimer);
154154
timer = setTimeout(function() { self.hide(e); }, conf.delay);
155155

156156
} else {

0 commit comments

Comments
 (0)