(blockId: string)
| 572 | |
| 573 | // pass null to refocus the currently focused block |
| 574 | function refocusNode(blockId: string) { |
| 575 | if (blockId == null) { |
| 576 | blockId = getFocusedBlockId(); |
| 577 | if (blockId == null) { |
| 578 | return; |
| 579 | } |
| 580 | } |
| 581 | const layoutModel = getLayoutModelForStaticTab(); |
| 582 | const layoutNodeId = layoutModel.getNodeByBlockId(blockId); |
| 583 | if (layoutNodeId?.id == null) { |
| 584 | return; |
| 585 | } |
| 586 | layoutModel.focusNode(layoutNodeId.id); |
| 587 | const bcm = getBlockComponentModel(blockId); |
| 588 | const ok = bcm?.viewModel?.giveFocus?.(); |
| 589 | if (!ok) { |
| 590 | const inputElem = document.getElementById(`${blockId}-dummy-focus`); |
| 591 | inputElem?.focus(); |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | async function loadConnStatus() { |
| 596 | const connStatusArr = await ClientService.GetAllConnStatus(); |
no test coverage detected