({ restore = true } = {})
| 3565 | let inlineTreeRenameState = null; |
| 3566 | |
| 3567 | function clearInlineTreeRenameState({ restore = true } = {}) { |
| 3568 | const state = inlineTreeRenameState; |
| 3569 | if (!state) return; |
| 3570 | |
| 3571 | inlineTreeRenameState = null; |
| 3572 | |
| 3573 | try { |
| 3574 | if (state.input && state.input.parentNode) { |
| 3575 | state.input.parentNode.removeChild(state.input); |
| 3576 | } |
| 3577 | } catch (e) { /* ignore */ } |
| 3578 | |
| 3579 | if (restore && state.labelEl) { |
| 3580 | state.labelEl.style.display = ''; |
| 3581 | state.labelEl.textContent = state.originalName; |
| 3582 | } |
| 3583 | |
| 3584 | if (state.optEl) { |
| 3585 | state.optEl.classList.remove('inline-rename-active'); |
| 3586 | } |
| 3587 | } |
| 3588 | |
| 3589 | function focusTreeRenameInput(input) { |
| 3590 | try { |
no outgoing calls
no test coverage detected