Page MenuHomePhabricator

Board drop target position is computed incorrectly after scrolling
Closed, ResolvedPublic

Description

When dragging a task in a workboard scrolling the page (with mouse wheel or arrow keys for example) causes the drop position of the task to be incorrectly calculated and displayed.

This can be recreated by creating a workboard with a large enough number of tasks to scroll a couple of pages in height. Dragging and then using the mouse wheel or arrow keys to scroll the page will cause the shown new position of the task to lie away from the actual location of the mouse and dragged task. The more that is scrolled the larger the gap between intended drop location and actual.

I have recreated this in both Chrome and Firefox.

Event Timeline

cpa199 raised the priority of this task from to Needs Triage.
cpa199 updated the task description. (Show Details)
cpa199 added a project: Workboards.
cpa199 added a subscriber: cpa199.

Are you up to date? D10186 was supposed to fix this.

I've just done a pull on all 3 projects (of course shutting down apache and phd daemons prior to doing this) and I did get some updates, however it unfortunately didn't fix the issue and I didn't originally install it more than a week ago which looks like it was after this fix.
I will restart the entire server when I can just to make doubly sure I've not missed something but currently it looks in my case like it is still happening.

Okay, I'll see if I can reproduce this. Maybe I didn't test D10186 properly.

chad triaged this task as Normal priority.Sep 2 2014, 5:30 PM
chad added a subscriber: chad.

I can sorta reproduce this, if you grab a card, and use the scroll wheel only, the position does not recalculate until the mouse moves. Once you mouse move, the position updates.

D10416 fixes the jumpiness when scrolling. I can't reproduce the original issue, per se, exactly as described -- works fine for me in both Firefox and Chrome.

I'm going to do another installation from latest source, I suspect I must have made a mistake if you can't reproduce. I'll do it when I get into work tomorrow.

I have updated to the most recent code, checked I've got the changes by comparing to the diffs linked above, however I can still fully replicate this issue.
I've loaded the javascript for DraggableList.js in my browser and ensured it has the changes you've made (to ensure there is no hidden caching), turned off entirely any browser caching but I still have the issue.
I'm willing to believe I've done something wrong but I'm afraid I'm running out of things that it could be.

cpa199 reopened this task as Open.EditedSep 5 2014, 10:01 AM

I've reopened it as either there is something that I'm missing or this issue still exists. I'm happy to provide you any more information you need but for me this makes the workboards pretty unusable once they have a realistic amount of work in.

I've attached a video of the behaviour too, which also shows a couple of the js files that were changed in the diffs you've linked and you can see the changes are there.
{F199425}

Hmm, I don't seem to be able to play that video in any program on my system.

What OS are you using?

It's a windows video as that was the quickest way for me to record. It's
actually running in an Ubuntu VM however screen cap in VM seems to just
record a black screen. I'll try and find a working video capture app that
will record mp4 or something and re-upload.

Here's what I see locally on Chrome in OSX :

Here is an mp4, and you'll see the difference compared to your video. I'm dragging up and down in a long list of a single column.

epriestley renamed this task from Scrolling the page while dragging a task on a workboard causes the new position of the task to be incorrect. to Calculation of aggregate scroll offset incorrect in Ubuntu.Sep 5 2014, 11:42 AM

This is not Ubuntu specific, I just tried this on Windows in Chrome and have the exact same issue.

epriestley renamed this task from Calculation of aggregate scroll offset incorrect in Ubuntu to Calculation of aggregate scroll offset incorrect on non-OSX OSes.Sep 5 2014, 11:58 AM

Sorry, I got this wrong. The issue reproduces for me. I was fixated on the "ghost" behavior because we changed it recently and D10186 fixed a real bug with it, and it took a while for it to sink in after watching your video.

epriestley renamed this task from Calculation of aggregate scroll offset incorrect on non-OSX OSes to Board drop target position is computed incorrectly after scrolling.Sep 5 2014, 3:54 PM

No worries, just glad you've been able to reproduce it and I wasn't going
mad!

Let me know if you're still seeing issues after that, this drag-and-drop stuff is a bit finicky.

That seems to have fixed the issue nicely. Thanks a lot :)