~ubuntu-branches/ubuntu/utopic/moodle/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/form/dndupload.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20140512161038-2039l24hvvlan3hs
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
355
355
         * @return boolean true if event has files
356
356
         */
357
357
        has_files: function(e) {
358
 
            var types = e._event.dataTransfer.types;
 
358
            // In some browsers, dataTransfer.types may be null for a
 
359
            // 'dragover' event, so ensure a valid Array is always
 
360
            // inspected.
 
361
            var types = e._event.dataTransfer.types || [];
359
362
            for (var i=0; i<types.length; i++) {
360
363
                if (types[i] == 'Files') {
361
364
                    return true;