File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,21 @@ class ToolTip {
166
166
// Stop/Restart listening
167
167
this . unListen ( ) ;
168
168
this . listen ( ) ;
169
+
170
+ if ( typeof updatedConfig . title === 'undefined' ) {
171
+ // We've recieved a new config without a title, hide the tooltip
172
+ this . hide ( ) ;
173
+ } else if ( prevConfig . title !== updatedConfig . title ) {
174
+ // We've recieved a new title that differs from the previous one,
175
+ // set the new element content and update positioning
176
+ this . setElementContent ( select ( Selector . TOOLTIP_INNER , this . $tip ) , this . getTitle ( ) ) ;
177
+ this . update ( ) ;
178
+
179
+ if ( typeof prevConfig . title === 'undefined' ) {
180
+ // There was no previous title set, so we also need to show the tooltip
181
+ this . show ( ) ;
182
+ }
183
+ }
169
184
}
170
185
171
186
// Destroy this instance
You can’t perform that action at this time.
0 commit comments