Moodle
  1. Moodle
  2. MDL-35771

Filepicker panels can not be dragged

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Filepicker
    • Labels:
    • Testing Instructions:
      Hide

      1/ purge caches
      2/ add mod_folder to some course
      3/ verify the file management dialogs can be dragged (create dir, rename, etc.)
      4/ verify the file picker can be dragged

      Best if tried in all supported browsers, the worst case would be if something was rendered above these dialogs, but I grepped the code and nothing seems to be using higher values.

      Show
      1/ purge caches 2/ add mod_folder to some course 3/ verify the file management dialogs can be dragged (create dir, rename, etc.) 4/ verify the file picker can be dragged Best if tried in all supported browsers, the worst case would be if something was rendered above these dialogs, but I grepped the code and nothing seems to be using higher values.
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w43_MDL-35771_m24_zindex
    • Rank:
      44522

      Description

      Seems like a regression since 3.7.1, discovered in MDL-35616 by David Monllaó:

      Filepicker modal windows (add a file or file details for example) can not be moved (drag & drop) properly, the movement stops before the drop but does not generate any JS error/warning, I can not reproduce the problem in 20-Sep weekly 2.4. Problem reproducible in:
      Linux + Chrome
      Linux + FireFox
      Windows 7 + IE8
      Windows 7 + FireFox
      Windows 7 + Chrome
      Windows 7 + Opera

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          I have tried to diagnose it myself, but failed. It seems that any panel dragging is interrupted by something on pages with filepicker or file manager.

          Show
          Petr Škoda added a comment - I have tried to diagnose it myself, but failed. It seems that any panel dragging is interrupted by something on pages with filepicker or file manager.
          Hide
          David Monllaó added a comment -

          FYI reverting 7a9b6cb6f211a3ccdbeec165e8238cfbdef321c7 (import YUI 3.7.2) and secondly 414e82b1dfc41514474bb37b77d49ff5333906ef (import YUI 3.7.1) the filepicker drag&drop works as expected.

          Show
          David Monllaó added a comment - FYI reverting 7a9b6cb6f211a3ccdbeec165e8238cfbdef321c7 (import YUI 3.7.2) and secondly 414e82b1dfc41514474bb37b77d49ff5333906ef (import YUI 3.7.1) the filepicker drag&drop works as expected.
          Hide
          Marina Glancy added a comment -

          Hi. I'm not sure what causes the problem but this is how Filepicker panels handle drag&drop:
          https://github.com/moodle/moodle/blob/master/repository/filepicker.js#L1280
          I set that panel header is a handler for the Drag plugin.

          This code is repeated for every panel in filepicker and filemanager (lib/form/filemanager.js) such as select file dialogue and all messages and confirmation 'windows'

          Show
          Marina Glancy added a comment - Hi. I'm not sure what causes the problem but this is how Filepicker panels handle drag&drop: https://github.com/moodle/moodle/blob/master/repository/filepicker.js#L1280 I set that panel header is a handler for the Drag plugin. This code is repeated for every panel in filepicker and filemanager (lib/form/filemanager.js) such as select file dialogue and all messages and confirmation 'windows'
          Hide
          Petr Škoda added a comment -

          I think I found it - if I lower the zindex values to something with 4 digit only all the dialogs start to drag fine. Now I am wondering why were the very large numbers used in filepicker and file manager...

          Show
          Petr Škoda added a comment - I think I found it - if I lower the zindex values to something with 4 digit only all the dialogs start to drag fine. Now I am wondering why were the very large numbers used in filepicker and file manager...
          Hide
          Petr Škoda added a comment -

          Arrrggh! The reason was that TinyMCE is using 200000 and 300000 index values...

          Show
          Petr Škoda added a comment - Arrrggh! The reason was that TinyMCE is using 200000 and 300000 index values...
          Hide
          Petr Škoda added a comment -

          I have patched TinyMCE for now, we should try to discover what caused the YUI regression later...

          Show
          Petr Škoda added a comment - I have patched TinyMCE for now, we should try to discover what caused the YUI regression later...
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Dan Poltawski added a comment -

          Hmm, is patching tinymce our only option here?

          Show
          Dan Poltawski added a comment - Hmm, is patching tinymce our only option here?
          Hide
          Dan Poltawski added a comment -

          I spoke to Sam about this, and he suggested:

          "No doubt we could fix that by reorganising our dialogs and zIndex, but that would be a mammoth job, and this close to release probably impossible

          It gets a +0.1 from me providing we open another issue, block to be fixed before we next import TinyMCE to fix our zIndexs"

          So, i've created MDL-36408 for that, and will continue with this issue.

          Show
          Dan Poltawski added a comment - I spoke to Sam about this, and he suggested: "No doubt we could fix that by reorganising our dialogs and zIndex, but that would be a mammoth job, and this close to release probably impossible It gets a +0.1 from me providing we open another issue, block to be fixed before we next import TinyMCE to fix our zIndexs" So, i've created MDL-36408 for that, and will continue with this issue.
          Hide
          Dan Poltawski added a comment -

          Thanks Petr, i've integrated this now.

          Show
          Dan Poltawski added a comment - Thanks Petr, i've integrated this now.
          Hide
          David Monllaó added a comment -

          It passes. Tested in master with Linux + Chrome and Win7 + IE9

          Show
          David Monllaó added a comment - It passes. Tested in master with Linux + Chrome and Win7 + IE9
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Amazed. Inspired. Grateful. That’s how your generosity makes me feel.

          (not really)

          Closing, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Amazed. Inspired. Grateful. That’s how your generosity makes me feel. (not really) Closing, thanks!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: