diff --git a/demos/fileinput/js/fileinput.js b/demos/fileinput/js/fileinput.js index 5dfa042d..fff49f0e 100644 --- a/demos/fileinput/js/fileinput.js +++ b/demos/fileinput/js/fileinput.js @@ -1,6 +1,6 @@ Ox.load('UI', function() { - var files = [], + var files, $menu = Ox.MainMenu({ menus: [ @@ -140,6 +140,7 @@ Ox.load('UI', function() { } }) ), + keys: {enter: 'upload', escape: 'cancel'}, title: 'Files', width: 288 + Ox.UI.SCROLLBAR_SIZE, height: 129 diff --git a/source/Ox.UI/js/Form/Ox.FileButton.js b/source/Ox.UI/js/Form/Ox.FileButton.js index c7becc96..715cc234 100644 --- a/source/Ox.UI/js/Form/Ox.FileButton.js +++ b/source/Ox.UI/js/Form/Ox.FileButton.js @@ -38,6 +38,7 @@ Ox.FileButton = function(options, self) { function selectFiles(e) { var filelist = e.target.files, files = []; + self.files = []; Ox.loop(filelist.length, function(i) { files.push(filelist.item(i)); });