UNPKG

bootstrap-vue

Version:

With more than 85 components, over 45 available plugins, several directives, and 1000+ icons, BootstrapVue provides one of the most comprehensive implementations of the Bootstrap v4 component and grid system available for Vue.js v2.6, complete with extens

14 lines (12 loc) 569 B
import { getSel, isElement } from '../../../utils/dom' // Helper to determine if a there is an active text selection on the document page // Used to filter out click events caused by the mouse up at end of selection // // Accepts an element as only argument to test to see if selection overlaps or is // contained within the element export const textSelectionActive = (el = document) => { const sel = getSel() return sel && sel.toString().trim() !== '' && sel.containsNode && isElement(el) ? /* istanbul ignore next */ sel.containsNode(el, true) : false }