prevent blur event on click

Solutions on MaxInterview for prevent blur event on click by the best coders in the world

showing results for - "prevent blur event on click"
Manuel
04 Nov 2019
1let elPreventBlur = document.getElementById(...);
2elPreventBlur.addEventListener('blur', (ev) => { 
3  		// Prevent the browser default handler
4		ev.preventDefault();
5        
6        ...
7        // additional code if required
8        ...
9});