File tree 5 files changed +4
-40
lines changed
5 files changed +4
-40
lines changed Original file line number Diff line number Diff line change @@ -1101,18 +1101,14 @@ export class DOMWidgetView extends WidgetView {
1101
1101
}
1102
1102
1103
1103
updateTooltip ( ) : void {
1104
- const title = this . tooltip ;
1105
- if ( ! title ) {
1106
- this . el . removeAttribute ( 'title' ) ;
1107
- } else if ( ! this . model . get ( 'description' ) ) {
1104
+ const title = this . model . get ( 'tooltip' ) ?? this . model . get ( 'description' ) ;
1105
+ if ( title ) {
1108
1106
this . el . setAttribute ( 'title' , title ) ;
1107
+ } else {
1108
+ this . el . removeAttribute ( 'title' ) ;
1109
1109
}
1110
1110
}
1111
1111
1112
- get tooltip ( ) {
1113
- return this . model . get ( 'tooltip' ) ?? this . model . get ( 'description' ) ;
1114
- }
1115
-
1116
1112
/**
1117
1113
* Update the DOM classes applied to an element, default to this.el.
1118
1114
*/
Original file line number Diff line number Diff line change @@ -179,14 +179,6 @@ export class CheckboxView extends DescriptionView {
179
179
}
180
180
}
181
181
182
- updateTooltip ( ) : void {
183
- super . updateTooltip ( ) ;
184
- if ( ! this . checkbox ) return ; // we might be constructing the parent
185
- const title = this . tooltip ;
186
- this . checkbox . setAttribute ( 'title' , title ) ;
187
- this . descriptionSpan . setAttribute ( 'title' , title ) ;
188
- }
189
-
190
182
events ( ) : { [ e : string ] : string } {
191
183
return {
192
184
'click input[type="checkbox"]' : '_handle_click' ,
Original file line number Diff line number Diff line change @@ -97,12 +97,6 @@ export class DescriptionView extends DOMWidgetView {
97
97
}
98
98
}
99
99
100
- updateTooltip ( ) : void {
101
- super . updateTooltip ( ) ;
102
- if ( ! this . label ) return ;
103
- this . label . title = this . tooltip ;
104
- }
105
-
106
100
label : HTMLLabelElement ;
107
101
}
108
102
Original file line number Diff line number Diff line change @@ -67,12 +67,6 @@ export class SelectionView extends DescriptionView {
67
67
}
68
68
}
69
69
70
- updateTooltip ( ) : void {
71
- super . updateTooltip ( ) ;
72
- if ( ! this . listbox ) return ; // we might be constructing the parent
73
- this . listbox . setAttribute ( 'title' , this . tooltip ) ;
74
- }
75
-
76
70
listbox : HTMLSelectElement ;
77
71
}
78
72
Original file line number Diff line number Diff line change @@ -378,12 +378,6 @@ export class TextareaView extends StringView {
378
378
}
379
379
}
380
380
381
- updateTooltip ( ) : void {
382
- super . updateTooltip ( ) ;
383
- if ( ! this . textbox ) return ; // we might be constructing the parent
384
- this . textbox . setAttribute ( 'title' , this . tooltip ) ;
385
- }
386
-
387
381
events ( ) : { [ e : string ] : string } {
388
382
return {
389
383
'keydown input' : 'handleKeyDown' ,
@@ -500,12 +494,6 @@ export class TextView extends StringView {
500
494
}
501
495
}
502
496
503
- updateTooltip ( ) : void {
504
- super . updateTooltip ( ) ;
505
- if ( ! this . textbox ) return ; // we might be constructing the parent
506
- this . textbox . setAttribute ( 'title' , this . tooltip ) ;
507
- }
508
-
509
497
update ( options ?: any ) : void {
510
498
/**
511
499
* Update the contents of this view
You can’t perform that action at this time.
0 commit comments