angular-code-input icon indicating copy to clipboard operation
angular-code-input copied to clipboard

Add option to clear previous input on backspace

Open leobia opened this issue 1 year ago • 2 comments

Consider adding this functionality for a different user experience while deleting:

Added an option to delete the previous character when the current input is empty.

Use case: User enters a wrong character and wants to delete it. Currently on an empty input with backspace is taken to the previous input but could be misled by the fact that the input still has the value.

Example: without new isClearPreviousIfEmpty option: old.webm

with new isClearPreviousIfEmpty option: new.webm

isClearPreviousIfEmpty + isPrevFocusableAfterClearing: isClearPreviousIfEmpty + isPrevFocusableAfterClearing.webm

leobia avatar May 17 '24 13:05 leobia

@leobia Thanks for the PR. I will check it!

AlexMiniApps avatar May 20 '24 11:05 AlexMiniApps

I need this feature, i'm struggling to reset the field when i got an error so maybe i can use that

Guigeek973 avatar Mar 05 '25 15:03 Guigeek973