()
| 113 | } |
| 114 | |
| 115 | const restore = () => { |
| 116 | const el = scroll |
| 117 | if (!el) return |
| 118 | |
| 119 | const pos = input.view().scroll(input.tab()) |
| 120 | if (!pos) return |
| 121 | |
| 122 | sync() |
| 123 | |
| 124 | if (code().length > 0) { |
| 125 | for (const item of code()) { |
| 126 | if (item.scrollLeft !== pos.x) item.scrollLeft = pos.x |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | if (el.scrollTop !== pos.y) el.scrollTop = pos.y |
| 131 | if (code().length > 0) return |
| 132 | if (el.scrollLeft !== pos.x) el.scrollLeft = pos.x |
| 133 | } |
| 134 | |
| 135 | const queueRestore = () => { |
| 136 | if (restoreFrame !== undefined) return |
no test coverage detected