Skip to content

Conversation

AaronLil
Copy link

This PR fixes an issue where the password input field was not focused after an error occurred during the delete user process. The fix uses nextTick to ensure the DOM is updated before focusing the input element. Additionally, the ref is now set on the form element instead of the input element.

Copy link

@salmankalela salmankalela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to make as many changes, just use useTemplateRef instead of ref.

@AaronLil
Copy link
Author

AaronLil commented Mar 2, 2025

@salmankalela, Could you show us an example?

@salmankalela
Copy link

See : #69 (comment)

@AaronLil
Copy link
Author

AaronLil commented Mar 2, 2025

@salmankalela, I just tested with useTemplateRef (#69) and encountered the following error:
Uncaught (in promise) TypeError: t.focus is not a function

image

Additionally, there's a TypeScript error showing up on VSCode Insiders:

image

@AaronLil AaronLil marked this pull request as draft March 3, 2025 05:17
@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!

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

Successfully merging this pull request may close these issues.

3 participants