kartik-v / bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
http://plugins.krajee.com/file-input
Other
5.36k stars 2.39k forks source link

fileselect event is triggered twice #1873

Open ferdossi opened 1 week ago

ferdossi commented 1 week ago

Prerequisites

Steps to reproduce the issue

  1. attach the fileselect event to your fileinput componenet like this $("#file-input").off("fileselect").on("fileselect", function (event) { console.log("fileselect"); event.stopPropagation(); event.preventDefault(); });

Expected behavior and actual behavior

When I follow those steps, I see in fileselect printed twice in the console

I was expecting it to be printed only once

Environment

Browsers

Operating System

Libraries

Isolating the problem