UNPKG

quasar

Version:

Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time

18 lines (16 loc) 505 B
import Platform from '../../plugins/platform/Platform.js' export function clearSelection () { if (window.getSelection !== void 0) { const selection = window.getSelection() if (selection.empty !== void 0) { selection.empty() } else if (selection.removeAllRanges !== void 0) { selection.removeAllRanges() Platform.is.mobile !== true && selection.addRange(document.createRange()) } } else if (document.selection !== void 0) { document.selection.empty() } }