Skip to content

Commit

Permalink
stop propagation for file input, input element. Fixes #182
Browse files Browse the repository at this point in the history
  • Loading branch information
jasny committed Mar 28, 2014
1 parent a8a87b1 commit 626d773
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/fileinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@

Fileinput.prototype.change = function(e) {
var files = e.target.files === undefined ? (e.target && e.target.value ? [{ name: e.target.value.replace(/^.+\\/, '')}] : []) : e.target.files

e.stopPropagation()

if (files.length === 0) {
this.clear()
Expand Down

0 comments on commit 626d773

Please sign in to comment.