src/mixins/multipleSelection.js
/**
     * Select exact input text from input to tags
     */
Select exact input text from input to tags
Select exact input text from input to tags
selectInputTextToTags() {
      const { input } = this.$refs;
      if (input.selectionStart === input.selectionEnd) {
        input.setSelectionRange(0, input.selectionEnd);
      } else {
        input.setSelectionRange(input.selectionStart, input.selectionEnd);
      }
      this.focusInput();
    }
selectInputTextToTags ( ) { const { input } = this . $refs ; if ( input . selectionStart === input . selectionEnd ) { input . setSelectionRange ( 0 , input . selectionEnd ) ; } else { input . setSelectionRange ( input . selectionStart , input . selectionEnd ) ; } this . focusInput ( ) ; }
Select exact input text from input to tags
Select exact input text from input to tags
// If user hasn't selected a partial text, // select all the text from the cursor to the beginning of the text // We need to focus the input to get the selected text visible