(value)
| 3168 | document.body.appendChild(menu); |
| 3169 | state.reportContextMenu = menu; |
| 3170 | return menu; |
| 3171 | } |
| 3172 | |
| 3173 | function hideReportContextMenu() { |
| 3174 | if (!state.reportContextMenu) return; |
| 3175 | // Bail out when already hidden. This runs from a capturing scroll listener, |
| 3176 | // so it fires on every scroll event for the life of the page; once the menu |
| 3177 | // has been created, without this guard each event did two DOM writes. |
| 3178 | if (state.reportContextMenu.classList.contains("hidden")) return; |
| 3179 | state.reportContextMenu.classList.add("hidden"); |
| 3180 | state.reportContextMenu.dataset.reportId = ""; |
| 3181 | } |
| 3182 | |
| 3183 | function showReportContextMenu(reportId, x, y) { |
| 3184 | if (!reportId) return; |
| 3185 | const menu = ensureReportContextMenu(); |
| 3186 | const labels = reportContextLabels(reportId); |
no outgoing calls
no test coverage detected