We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f93578 commit dc81b05Copy full SHA for dc81b05
packages/controls/src/widget_button.ts
@@ -101,10 +101,15 @@ export class ButtonView extends DOMWidgetView {
101
update(): void {
102
this.el.disabled = this.model.get('disabled');
103
this.updateTabindex();
104
- this.el.setAttribute('title', this.model.get('tooltip'));
105
+ const tooltip = this.model.get('tooltip');
106
const description = this.model.get('description');
107
const icon = this.model.get('icon');
108
+
109
+ tooltip
110
+ ? this.el.setAttribute('title', tooltip)
111
+ : this.el.setAttribute('title', description);
112
113
if (description.length || icon.length) {
114
this.el.textContent = '';
115
if (icon.length) {
0 commit comments