svelte-tel-input 3.6.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,6 +51,9 @@ const updateCountry = (countryCode) => {
51
51
  return country;
52
52
  };
53
53
  const findNewCursorPosition = (newValue, formattedValue, initialCursorPosition) => {
54
+ if (initialCursorPosition >= newValue.length) {
55
+ return formattedValue.length;
56
+ }
54
57
  let fvIndex = 0;
55
58
  for (let nvIndex = 0; nvIndex < initialCursorPosition; nvIndex++) {
56
59
  const nvChar = allowedCharacters(newValue[nvIndex], { spaces: false });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "svelte-tel-input",
3
3
  "description": "svelte-tel-input",
4
- "version": "3.6.0",
4
+ "version": "3.6.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/gyurielf/svelte-tel-input.git"