Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51854

Atto image drag and drop support prevents other drop handlers

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.9.2, 3.0
    • 2.9.3
    • Text editor Atto
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_29_STABLE
    • MDL-51854-master
    • Hide

      Load the other plugin before the "image" plugin, by listing it earlier in the Atto toolbar config. This may not be an option if the plugin in question creates a button which you want to appear later in the Atto toolbar than the standard "image" plugin's button.

      Show
      Load the other plugin before the "image" plugin, by listing it earlier in the Atto toolbar config. This may not be an option if the plugin in question creates a button which you want to appear later in the Atto toolbar than the standard "image" plugin's button.
    • Hide
      • Install the filedragdrop plugin from https://github.com/pauln/moodle-atto_filedragdrop
      • Make sure that "filedragdrop" is in the Atto toolbar configuration - and that it comes after "image"
      • Create or edit a label
      • Drag a non-image file into the Atto editor and confirm that it uploads the file and adds a link to it
      Show
      Install the filedragdrop plugin from https://github.com/pauln/moodle-atto_filedragdrop Make sure that "filedragdrop" is in the Atto toolbar configuration - and that it comes after "image" Create or edit a label Drag a non-image file into the Atto editor and confirm that it uploads the file and adds a link to it

    Description

      When drag and drop uploading support was incorporated into the atto_image plugin in MDL-43996, the return statement in the drop handler was moved outside the main if statement. This means that it now always returns false, preventing any subsequent Atto plugins from listening to the drop event to handle other file types.

      For example, if you install the generic (non-image) file dragdrop plugin from https://github.com/pauln/moodle-atto_filedragdrop, it won't trigger unless you load it before atto_image (i.e. "filedragdrop" comes before "image" in your Atto toolbar configuration.

      Attachments

        Activity

          People

            paul.n Paul Nicholls
            paul.n Paul Nicholls
            Andrew Lyons Andrew Lyons
            Dan Poltawski Dan Poltawski
            Ryan Wyllie Ryan Wyllie
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9/Nov/15