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

Atto image drag and drop support prevents other drop handlers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9.2, 3.0
    • Fix Version/s: 2.9.3
    • Component/s: HTML Editor (Atto)
    • Labels:
    • Testing Instructions:
      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
    • Workaround:
      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.
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-51854-master

      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

            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/15