提交 e6f2c117 编写于 作者: B Benjamin Pasero

widgets - more focus related methods

上级 1e0df6a4
......@@ -211,6 +211,10 @@ export class Button extends Disposable {
focus(): void {
this._element.focus();
}
hasFocus(): boolean {
return this._element === document.activeElement;
}
}
export class ButtonGroup extends Disposable {
......
......@@ -230,6 +230,14 @@ export class SimpleCheckbox extends Widget {
this.applyStyles();
}
focus(): void {
this.domNode.focus();
}
hasFocus(): boolean {
return this.domNode === document.activeElement;
}
style(styles: ISimpleCheckboxStyles): void {
this.styles = styles;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册