File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,12 @@ $.widget( "ui.tooltip", {
173
173
target = $ ( event ? event . currentTarget : this . element ) ,
174
174
tooltip = this . _find ( target ) ;
175
175
176
+ // disabling closes the tooltip, so we need to track when we're closing
177
+ // to avoid an infinite loop in case the tooltip becomes disabled on close
178
+ if ( this . closing ) {
179
+ return ;
180
+ }
181
+
176
182
// don't close if the element has focus
177
183
// this prevents the tooltip from closing if you hover while focused
178
184
if ( ! force && this . document [ 0 ] . activeElement === target [ 0 ] ) {
@@ -195,7 +201,9 @@ $.widget( "ui.tooltip", {
195
201
target . removeData ( "tooltip-open" ) ;
196
202
target . unbind ( "mouseleave.tooltip focusout.tooltip keyup.tooltip" ) ;
197
203
204
+ this . closing = true ;
198
205
this . _trigger ( "close" , event , { tooltip : tooltip } ) ;
206
+ this . closing = false ;
199
207
} ,
200
208
201
209
_tooltip : function ( element ) {
You can’t perform that action at this time.
0 commit comments