* Set the text selection inside the input with the given start and end position. * * @param {number} start * @param {number} end * @private
(start, end)
| 8695 | * @private |
| 8696 | */ |
| 8697 | _setSelection(start, end) { |
| 8698 | //TODO use this function to replace the direct calls to `setElementSelection()`, wherever possible |
| 8699 | start = Math.max(start, 0); |
| 8700 | end = Math.min(end, AutoNumericHelper.getElementValue(this.domElement).length); |
| 8701 | this.selection = { |
| 8702 | start, |
| 8703 | end, |
| 8704 | length: end - start, |
| 8705 | }; |
| 8706 | |
| 8707 | AutoNumericHelper.setElementSelection(this.domElement, start, end); |
| 8708 | } |
| 8709 | |
| 8710 | /** |
| 8711 | * Set the caret position inside the input at the given position. |
no test coverage detected