inputmask autoFocus propertie doesn't working

UI Components for React
Post Reply
jcruz_23
Posts: 1
Joined: 09 Aug 2022, 15:46

09 Aug 2022, 16:32

Code: Select all

                             <InputMask
                                       autoFocus={true}
                                        style={{ width: '100%' }}
                                        mask="(99) 9? 9999-9999"
                                        autoClear={false}
                                        onChange={(event) => {
                                         this.phone = event.target.value;
                                        }}
                                      />
I'm using the InputMask in a Modal, the modal should open with the focus on InputMask, but is not working

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

16 Aug 2022, 13:46

Can you create a small Code Sandbox reproducer so I can debug: https://codesandbox.io/s/primereact-test-forked-bbns8k
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

ivan.brizuela
Posts: 1
Joined: 21 Jun 2018, 18:30

28 Feb 2023, 15:44

This reproduces the error somehow: an exception is raised when InputMask is set with autoFocus={true}.

In my code, the exception is not raised but the autoFocus value is ignored (focus is set to next component).

https://codesandbox.io/s/primereact-tes ... c/index.js

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

01 Mar 2023, 14:47

OK great can you open a gitHub issue and include your reproducer: https://github.com/primefaces/primereact/issues
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests