Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught RangeError: Maximum call stack size exceeded #2825

Open
subarachnid opened this issue Oct 23, 2024 · 1 comment
Open

Uncaught RangeError: Maximum call stack size exceeded #2825

subarachnid opened this issue Oct 23, 2024 · 1 comment

Comments

@subarachnid
Copy link

subarachnid commented Oct 23, 2024

This seems to be the same issue as #2814

Demo: https://jsfiddle.net/qs2cL9fk/
Instructions: Place the cursor at the very start of the inputfield and input the number "1".

Demo code:

<script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inputmask/5.0.10-beta.11/jquery.inputmask.min.js" integrity="sha512-kEvhB1jYb2A2VMh3KCB49xB76q0veWA2M+WA/7Jvju9Dy2BaiI4FKC72UhuuxGyb9PzCCsqaahPSKLP1N3hKmw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<input type="text" data-inputmask="'alias': 'mydate'" value="24.10.2024" />
<script>
Inputmask.extendAliases({
	mydate: {
		inputFormat: 'dd.mm.yyyy',
		placeholder: 'TT.MM.JJJJ',
		alias: 'datetime'
	},
});
$(document).ready(function(){
  $(":input").inputmask();
});
</script>

The bug seems to only happen when the inputfield is already filled with a value.

OS: Windows 10
Browser: Chrome 130.0.6723.59
Inputmask version: 5.0.10-beta.11

@melloware
Copy link

melloware commented Oct 24, 2024

We have a similar issue...

Original Bug Report at PrimeFaces: primefaces/primefaces#12770

InputMask: 5.10

Configuration:

{
alias: "datetime",
autoUnmask: false,
clearIncomplete: false,
clearMaskOnLostFocus: false,
inputFormat: "dd\/mm\/yyyy HH:MM:ss",
placeholder: "_",
showMaskOnHover: false,
 }
  1. Click into datePicker input field
  2. Put the cursor at the beginning of the field
  3. Type "12" to try and set the day to 12
  4. Observe the stack trace

CodePen: https://codepen.io/melloware/pen/GRVOERo

Uncaught RangeError: Maximum call stack size exceeded
    at y.h (jquery.inputmask.min.js:8:99582)
    at y.p (jquery.inputmask.min.js:8:99052)
    at y.f (jquery.inputmask.min.js:8:98414)
    at jquery.inputmask.min.js:8:105270
    at y.h (jquery.inputmask.min.js:8:105517)
    at y.p (jquery.inputmask.min.js:8:99052)
    at y.f (jquery.inputmask.min.js:8:98414)
    at jquery.inputmask.min.js:8:105270
    at y.h (jquery.inputmask.min.js:8:105517)
    at y.p (jquery.inputmask.min.js:8:99052)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants