We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e92b49f commit a40ff70Copy full SHA for a40ff70
src/core.js
@@ -64,6 +64,12 @@ export function inputHandler(event) {
64
export function updateCursor(el, cursorPosition, isCursorAtEnd, digit) {
65
const display = el.value
66
67
+ // setSelectionRange applies only to inputs of types text, search, URL, tel and password.
68
+ // https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
69
+ if (!['text', 'tel', 'search'].includes(el.getAttribute('type'))) {
70
+ return
71
+ }
72
+
73
// set the cursor position to an appropriate location
74
if (el === document.activeElement) {
75
if (isCursorAtEnd) {
0 commit comments