()
| 345 | // The user has found what they're looking for and is finished searching. We enter insert mode, if |
| 346 | // possible. |
| 347 | static handleEscape() { |
| 348 | document.body.classList.remove("vimium-find-mode"); |
| 349 | // Removing the class does not re-color existing selections. we recreate the current selection |
| 350 | // so it reverts back to the default color. |
| 351 | const selection = globalThis.getSelection(); |
| 352 | if (!selection.isCollapsed) { |
| 353 | const range = globalThis.getSelection().getRangeAt(0); |
| 354 | globalThis.getSelection().removeAllRanges(); |
| 355 | globalThis.getSelection().addRange(range); |
| 356 | } |
| 357 | return focusFoundLink() || selectFoundInputElement(); |
| 358 | } |
| 359 | |
| 360 | // Save the query so the user can do further searches with it. |
| 361 | static handleEnter() { |
no test coverage detected