Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Debounce and disable. You needs it. Always implement it, the after click story matters.
-
@SortOfTested life is what comes after the joke, or something. From Jedi Gym.
@Meetife "sane person", that means someone in management will do this. -
Accessibility problem ahead: people with hand tremor may click several times by accident, though that problem is lessened if you have proper keyboard navigation. You do have that, right?
As @SortOfTested said, disable the button handler when the button is being handled, and keep around maybe a 100ms guard time before re-enabling it. -
@Fast-Nop
And for buttons that trigger async operations, physically disable the button and provide visual indication that something is processing while they wait. -
@spongessuck
Looks interesting. I generally use something like this so that all components can share a single waitable, and the behavior is decoupled from the button behavior itself:
https://stackblitz.com/edit/... -
Meetife6414y@Demolishun Lol... The code slip
Through management as it has been approve for production.
Have anyone experience unexpected behavior using JavaScript? So I wrote this script that manipulate the DOM... however on over clicking a button... Something breaks, however the deadline is tomorrow. Code review is successful. I am sure no sane person will click a button that many times 😅
random