• HTML, JavaScript

    Handle Cancel Click on File Input

    Ever Tried capturing cancel event on Browse file input type in HTML, tbh there is no direct way to do so But there is a workaround adding a bit of javascript. We can play with onfocus event of the BODY element. Example -> HTML

      Javascript

    See it working here