Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Drag and Drop file to Uploaditem/FileItem widget not working n IE9 or lower version

    Hi,

    I am trying to build a Drag and Drop component(Dragging files from desktop) in Smart GWT.
    I could not find any widget in showcase or anywhere else which does drag and drop files from desktop to widget.
    I tried to use UploadItem/FileUpload but Drag and Drop is working in firefox,chrome,Internet explorer 10 and upper version but
    not on Internet explorer 9 or lower versions.

    below are the details :-

    1. SmartGWT Version used : 4.0p Dated 2013-12-23
    Browsers Used : Mozilla,chrome,IE10,IE9 and lower version

    2. browser(s) and version(s) involved : IE9 and lower version

    3. for a server-side problem, the *complete* logs generated during processing of the failing request (do *not* trim to just the error message) NA

    4. for any problem processing a server response, the actual response as shown in the RPC tab in the Developer Console NA

    5. if there is a JavaScript error, the stack trace logged in the Developer Console (see FAQ)

    6. sample code if applicable
    Code:
     
     final GeoFileUpload uploadItem = GeoFileUpload.create("file", LABELS.selectZipFile(), "220");
            uploadItem.registerUploadListener(uploadListener);
    public final class GeoFileUpload extends UploadItem {
    public static GeoFileUpload create(String name, String title, String width) {
            GeoFileUpload fileUpload = create(name, title);
            fileUpload.setWidth(width);
            return fileUpload;
        }
    
    }
    public static GeoFileUpload create(String name, String title) {
            GeoFileUpload fileUpload = new GeoFileUpload();
            fileUpload.setName(name);
            fileUpload.setTitle(title);
            return fileUpload;
        }
    I also tried to make it working using html and javascripts and wrapping it in HTMLFlow widget in my component.
    It is working fine in firefox,chrome,Internet explorer 10 and upper version but not on Internet explorer or lower versions.
    I had tested my html,javscript in all the enviornment and it is working fine but when i warp it in my HTMLFlow component it does not work in IE9 or lower version. I am attaching the code of my HTMLFlow component.

    Please suggest what shall we do to fix this issue.
    Attached Files
    Last edited by nayyer.kamran; 15 Jul 2015, 06:19.

    #2
    After looking at this, we're seeing inconsistent results from different versions of IE.

    It looks like IE10+ just don't support dragging files onto an <input type="file"> anymore, even with extremely basic HTML like this:

    Code:
    <!DOCTYPE html>
    <html>
        <body>
            <form>
                File name: <input type="file"><br>
            </form>
        </body>
    </html>
    Whether old editions of IE still support this gesture seems to be inconsistent - it seems to be based on whether certain OS-level patches were applied.

    We're not sure why Microsoft decided to drop support for this gesture when all other browsers still support it. You can always a file a bug with them and hope they reverse course.

    Note that MS is supporting the new HTML5 drag and drop APIs which allow using a <div> or other basic element as a drop zone for files. This will allow re-creating a droppable area in IE10+, but of course won't fix older IE where this support wasn't implemented yet.

    Comment

    Working...
    X