(e)
| 152 | |
| 153 | // Capture Enter key in the search box to make it pivot instead of focus. |
| 154 | function handleSearchKey(e) { |
| 155 | if (e.key != 'Enter') return; |
| 156 | e.stopImmediatePropagation(); // Disable normal enter key handling |
| 157 | const val = search.value; |
| 158 | try { |
| 159 | new RegExp(search.value); |
| 160 | } catch (error) { |
| 161 | return; // TODO: Display error state in search box |
| 162 | } |
| 163 | switchPivots(val); |
| 164 | } |
| 165 | |
| 166 | function switchPivots(regexp) { |
| 167 | // Switch URL without hitting the server. |
nothing calls this directly
no test coverage detected
searching dependent graphs…