Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly position cloned sortable element on mobile
Added a helper function to the jQuery UI Sortable call to fix the positioning of the cloned sortable element when dragging on mobile. Tested on latest Chrome/Safari on iOS 11.3. May need testing on Android devices to confirm the fix.
- Loading branch information
bfe91df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small piece of feedback, I'd reference the issue in the commit message to make it easier to link back to it. The fix looks good to me.
Do you have any ideas on why this might of changed?
bfe91df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably also want to get confirmation on Android, although I guess the initial bug report doesn't mention it being broken there.
bfe91df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sboisvert
Noted. 👍
I originally thought there may have been a new version of touch punch that had a fix. There is a new version, but it doesn't fix this issue. The last commit for
jquery-ui-touch-punch
was in December of 2014 so I'm guessing it's abandoned unless someone has forked and maintained it. Since the latestjquery-ui-touch-punch
didn't solve the issue, I'm would be that WordPress updated thejquery-ui-sortable
version and it no longer interacted withjquery-ui-touch-punch
the same way. This would need to be investigated, though.Agreed. I don't have an Android device to check on, but I'll see if I have a free trial left on BrowserStack.
bfe91df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sboisvert - Checked this out on a physical Android device through BrowserStack and Chrome did not show the same behavior as iOS. Also functions correctly with this patch in place.
Do you see any blockers to making a PR with this commit?
bfe91df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's PR it!