Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sortable Fix-Up #1793

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Update sortable.js
* Removed scrollParent placeholder basis due to unknown difference between local copy and pushed copy functionality
  • Loading branch information
borgboyone committed Feb 16, 2017
commit 481c37f104b2dd8a50b1e43014d43934e39f7de6
12 changes: 6 additions & 6 deletions ui/widgets/sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ return $.widget( "ui.sortable", $.ui.mouse, {
//Cache the margins of the original element
this._cacheMargins();

//Get the next scrolling parent
this.scrollParent = this.helper.scrollParent();

//The element's absolute position on the page minus margins
this.offset = this.currentItem.offset();
this.offset = {
Expand Down Expand Up @@ -260,9 +263,6 @@ return $.widget( "ui.sortable", $.ui.mouse, {
//Create the placeholder
this._createPlaceholder();

//Get the next scrolling parent (based on the placeholder in case the helper is appended)
this.scrollParent = this.placeholder.scrollParent();

//Set a containment if given in the options
if ( o.containment ) {
this._setContainment();
Expand Down Expand Up @@ -1086,12 +1086,12 @@ return $.widget( "ui.sortable", $.ui.mouse, {
this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
this.currentContainer = this.containers[ innermostIndex ];

//Update scrollParent
this.scrollParent = this.helper.scrollParent();

//Update the placeholder
this.options.placeholder.update( this.currentContainer, this.placeholder );

//Update scrollParent
this.scrollParent = this.placeholder.scrollParent();

this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
this.containers[ innermostIndex ].containerCache.over = 1;
}
Expand Down