Uploaded image for project: 'PhenoTips'
  1. PT-3113

The JS drag/drop library used by PhenoTips modal dialogues does not handle relative positioning well

    Details

    • Sprint:

      Description

      When a modal positioned relatively (e.g. `top: 35%`) is being dragged using a mouse it first jumps to the top of the screen, then returns to normal position (which is visually annoying)

      The problem is in `dragdrop.js` code:

        currentDelta: function() {
          return([
            parseInt(Element.getStyle(this.element,'left') || '0'),
            parseInt(Element.getStyle(this.element,'top') || '0')]);
        }
      

      does not handle `this.element.top` being a percentage instead of an integer, so it moves the dialogue to the top (`top: 0px`)

        Attachments

          Activity

            People

            • Assignee:
              asm Andriy Misyura
              Reporter:
              asm Andriy Misyura
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: