{"action":"closed","issue":{"url":"https://api.github.com/repos/manolo/gwtupload/issues/5","labels_url":"https://api.github.com/repos/manolo/gwtupload/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/manolo/gwtupload/issues/5/comments","events_url":"https://api.github.com/repos/manolo/gwtupload/issues/5/events","html_url":"https://github.com/manolo/gwtupload/issues/5","id":41636539,"number":5,"title":"Browser input upload after Drag and Drop issue","user":{"login":"flo78","id":8614855,"avatar_url":"https://avatars.githubusercontent.com/u/8614855?v=3","gravatar_id":"","url":"https://api.github.com/users/flo78","html_url":"https://github.com/flo78","followers_url":"https://api.github.com/users/flo78/followers","following_url":"https://api.github.com/users/flo78/following{/other_user}","gists_url":"https://api.github.com/users/flo78/gists{/gist_id}","starred_url":"https://api.github.com/users/flo78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flo78/subscriptions","organizations_url":"https://api.github.com/users/flo78/orgs","repos_url":"https://api.github.com/users/flo78/repos","events_url":"https://api.github.com/users/flo78/events{/privacy}","received_events_url":"https://api.github.com/users/flo78/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"manolo","id":161853,"avatar_url":"https://avatars.githubusercontent.com/u/161853?v=3","gravatar_id":"","url":"https://api.github.com/users/manolo","html_url":"https://github.com/manolo","followers_url":"https://api.github.com/users/manolo/followers","following_url":"https://api.github.com/users/manolo/following{/other_user}","gists_url":"https://api.github.com/users/manolo/gists{/gist_id}","starred_url":"https://api.github.com/users/manolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manolo/subscriptions","organizations_url":"https://api.github.com/users/manolo/orgs","repos_url":"https://api.github.com/users/manolo/repos","events_url":"https://api.github.com/users/manolo/events{/privacy}","received_events_url":"https://api.github.com/users/manolo/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2014-09-01T13:16:07Z","updated_at":"2015-01-08T09:30:36Z","closed_at":"2015-01-08T09:30:36Z","body":"I use a SingleUploader instantiated like this with drag and drop and custom upload link\r\n```\r\n   // Single Uploader / Upload button \r\n\t    Label uploadButton = new Label();\r\n\t    uploadButton.setText(\"upload\");\r\n\t    // uploader\r\n\t    FileInputType input = FileInputType.CUSTOM.with(uploadButton).with((IDropZone) customExternalDropZone);\r\n\t    SingleUploader dragDropUploader = new SingleUploader(input,new UploadStatus());\r\n ```\r\nCase that works:\r\nSingle upload of one or multiple file with classical browser input form\r\nSingle Drag and drop  of one or multiple file.\r\nSingle Drag and drop  of one or multiple file after making a single upload of one or multiple file with classical browser input form\r\n\r\nWhat does not work :\r\nUpload of one or multiple file with classical browser input form after making a single Drag and drop  of one or multiple file\r\n\r\nInvestigating the code,I found in the class DragAndDropFormPanel , that the browser input in not detected and drag and drop is detected (probably due to past drag and drop):\r\n```\r\n    @Override\r\n    public void submit() {\r\n        final List<IFileInput> childFileInputs = getChildFileInputs();\r\n        if (childFileInputs == null || childFileInputs.isEmpty()) {\r\n            return;\r\n        }\r\n        final ArrayList<IDragAndDropFileInput> dndFileInputs = \r\n                new ArrayList<IDragAndDropFileInput>();\r\n        boolean thereAreNonDragAndDropFileInputs = false;\r\n        for (IFileInput fileInput : childFileInputs) {\r\n            if (fileInput instanceof IDragAndDropFileInput) {\r\n                final IDragAndDropFileInput dndFileInput = (IDragAndDropFileInput) fileInput;\r\n                if (dndFileInput.thereAreDragAndDropedFiles()) {\r\n                    dndFileInputs.add(dndFileInput);\r\n                } else {\r\n                    // files might be selected via file dialog\r\n                    thereAreNonDragAndDropFileInputs = true;\r\n                }\r\n            } else {\r\n                // files are selected via file dialog\r\n                thereAreNonDragAndDropFileInputs = true;\r\n            }\r\n        }\r\n        if (thereAreNonDragAndDropFileInputs) {\r\n            super.submit(); // submit non-dnd file inputs\r\n        }\r\n        if (!dndFileInputs.isEmpty()) {\r\n            submitDragAndDropFileInputs(dndFileInputs); // submit dnd file inputs\r\n        }\r\n    }\r\n```\r\nbecause there were drag and dropped file in the past, the call dndFileInput.thereAreDragAndDropedFiles() is always returning true, even if I make a classical browser input upload instead of a drag and drop upload. I cannot find a place where the list of drag and dropped files is cleared.\r\n\r\n"}}