focus method
Moves the focus to the element. https://html.spec.whatwg.org/multipage/interaction.html#dom-focus
Implementation
@override
void focus() {
if (ownerDocument.focusedElement != this) {
// Blur current focused element.
ownerDocument.focusedElement?.blur();
// Focus kraken widget to get focus from other widgets.
WidgetDelegate? widgetDelegate = ownerDocument.widgetDelegate;
widgetDelegate?.requestFocus();
ownerDocument.focusedElement = this;
focusTextFormControl();
}
}