Deselect everything that is selected

suggest change

This is browser-only. removeAllRanges() clears the current selection. getSelection() can return null when there is no selection object.

const sel = document.getSelection();
if (sel) {
  sel.removeAllRanges();
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents