()
| 74 | } |
| 75 | |
| 76 | refocusNode() { |
| 77 | const ftype = globalStore.get(this.focusType); |
| 78 | if (ftype == "waveai") { |
| 79 | WaveAIModel.getInstance().focusInput(); |
| 80 | return; |
| 81 | } |
| 82 | const layoutModel = getLayoutModelForStaticTab(); |
| 83 | const lnode = globalStore.get(layoutModel.focusedNode); |
| 84 | if (lnode == null || lnode.data?.blockId == null) { |
| 85 | return; |
| 86 | } |
| 87 | layoutModel.focusNode(lnode.id); |
| 88 | const blockId = lnode.data.blockId; |
| 89 | const bcm = getBlockComponentModel(blockId); |
| 90 | const ok = bcm?.viewModel?.giveFocus?.(); |
| 91 | if (!ok) { |
| 92 | const inputElem = document.getElementById(`${blockId}-dummy-focus`); |
| 93 | inputElem?.focus(); |
| 94 | } |
| 95 | } |
| 96 | } |
no test coverage detected