Change-Id: I7fa745c269e63d699671cdaf0b527f2675ce3081
// Here we store the final page that will be dropped to, if the workspace in fact
// receives the drop
if (mInScrollArea) {
- mDropToLayout = mDragOverlappingLayout;
+ if (isPageMoving()) {
+ // If the user drops while the page is scrolling, we should use that page as the
+ // destination instead of the page that is being hovered over.
+ mDropToLayout = (CellLayout) getPageAt(getNextPage());
+ } else {
+ mDropToLayout = mDragOverlappingLayout;
+ }
} else {
mDropToLayout = mDragTargetLayout;
}