File tree Expand file tree Collapse file tree 5 files changed +4
-40
lines changed Expand file tree Collapse file tree 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 {
11011101 }
11021102
11031103 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 ) {
11081106 this . el . setAttribute ( 'title' , title ) ;
1107+ } else {
1108+ this . el . removeAttribute ( 'title' ) ;
11091109 }
11101110 }
11111111
1112- get tooltip ( ) {
1113- return this . model . get ( 'tooltip' ) ?? this . model . get ( 'description' ) ;
1114- }
1115-
11161112 /**
11171113 * Update the DOM classes applied to an element, default to this.el.
11181114 */
Original file line number Diff line number Diff line change @@ -179,14 +179,6 @@ export class CheckboxView extends DescriptionView {
179179 }
180180 }
181181
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-
190182 events ( ) : { [ e : string ] : string } {
191183 return {
192184 '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 {
9797 }
9898 }
9999
100- updateTooltip ( ) : void {
101- super . updateTooltip ( ) ;
102- if ( ! this . label ) return ;
103- this . label . title = this . tooltip ;
104- }
105-
106100 label : HTMLLabelElement ;
107101}
108102
Original file line number Diff line number Diff line change @@ -67,12 +67,6 @@ export class SelectionView extends DescriptionView {
6767 }
6868 }
6969
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-
7670 listbox : HTMLSelectElement ;
7771}
7872
Original file line number Diff line number Diff line change @@ -378,12 +378,6 @@ export class TextareaView extends StringView {
378378 }
379379 }
380380
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-
387381 events ( ) : { [ e : string ] : string } {
388382 return {
389383 'keydown input' : 'handleKeyDown' ,
@@ -500,12 +494,6 @@ export class TextView extends StringView {
500494 }
501495 }
502496
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-
509497 update ( options ?: any ) : void {
510498 /**
511499 * Update the contents of this view
You can’t perform that action at this time.
0 commit comments