primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.59k stars 4.62k forks source link

InputText generates anomalous focus behavior due to use of detectChanges() #16697

Open jucasoft opened 2 weeks ago

jucasoft commented 2 weeks ago

the this.cd.detectChanges() method is used in the InputText directive, forcing control of the renderer immediately creates anomalous behavior in the management of the focus. in my case it moves the focus to the html body .

Is there a reason why you use this.cd.detectChanges() and not this.cd.markForCheck()?

I decided to clone the component in my project and eliminated this.cd.detectChanges(), it still works. but I think the best thing is to use this.cd.markForCheck()

I hope I have been of help.

github-actions[bot] commented 4 days ago

More information is needed to find a solution. A runnable StackBlitz example and additional details would be helpful.

github-actions[bot] commented 4 days ago

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles: