|
@@ -100,6 +100,15 @@ export default class ButtonView extends View {
|
|
|
*/
|
|
*/
|
|
|
this.set( 'icon' );
|
|
this.set( 'icon' );
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Controls the `tabindex` attribute of the button.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @observable
|
|
|
|
|
+ * @default -1
|
|
|
|
|
+ * @member {String} #tabindex
|
|
|
|
|
+ */
|
|
|
|
|
+ this.set( 'tabindex', -1 );
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Tooltip of the button bound to the template.
|
|
* Tooltip of the button bound to the template.
|
|
|
*
|
|
*
|
|
@@ -139,7 +148,8 @@ export default class ButtonView extends View {
|
|
|
type: bind.to( 'type', value => value ? value : 'button' ),
|
|
type: bind.to( 'type', value => value ? value : 'button' ),
|
|
|
'data-ck-tooltip': [
|
|
'data-ck-tooltip': [
|
|
|
bind.to( '_tooltipString' )
|
|
bind.to( '_tooltipString' )
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+ tabindex: bind.to( 'tabindex' )
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
children: [
|
|
children: [
|
|
@@ -204,6 +214,13 @@ export default class ButtonView extends View {
|
|
|
return promise.then( () => super.init() );
|
|
return promise.then( () => super.init() );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Focuses the button.
|
|
|
|
|
+ */
|
|
|
|
|
+ focus() {
|
|
|
|
|
+ this.element.focus();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Gets value for the `data-ck-tooltip` attribute from the combination of
|
|
* Gets value for the `data-ck-tooltip` attribute from the combination of
|
|
|
* {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.
|
|
* {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.
|