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.
- 
				
				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/...
- 
				
				 Meetife6165y@Demolishun Lol... The code slip Meetife6165y@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