Skip to content

Commit

Permalink
Merge pull request #2450 from PaulL1/2443_fix_importer
Browse files Browse the repository at this point in the history
Fix #2443 (importer): Firefox doesn't have srcElement
  • Loading branch information
PaulL1 committed Dec 26, 2014
2 parents 5d9bb5e + b60aca9 commit 54b0501
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/features/importer/js/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,12 @@
templateUrl: 'ui-grid/importerMenuItem',
link: function ($scope, $elm, $attrs, uiGridCtrl) {
var handleFileSelect = function( event ){
if (event.srcElement.files.length === 1) {
var target = event.srcElement || event.target;

if (target && target.files && target.files.length === 1) {
var fileObject = event.srcElement.files[0];
uiGridImporterService.importThisFile( grid, fileObject );
event.srcElement.form.reset();
target.form.reset();
}
};

Expand Down

0 comments on commit 54b0501

Please sign in to comment.