We're updating the issue view to help you get more done. 

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

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:

1 2 3 4 5 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`)

Environment

Status

Assignee

Andrew Misyura

Reporter

Andrew Misyura