Drag and drop for git interactive rebase doesn't work
Hi,
When trying to change the order of commits when doing for example git rebase -i HEAD~4 (as in level Moving Work Around:2) nothing happens. Tried this in different browsers (chrome, firefox, Internet explorer) on linux and windows pcs.
And thanks for this wonderful site btw
Same with me
21 hours ago #681 was merged which bumped jQuery from 1.8.0 to 3.4.0 but from 1.9 $.browser endpoint was removed (was deprecated since 1.3) - docs: https://api.jquery.com/jQuery.browser/
That's probably what broke it
hrm I downgraded the version but I'm still getting errors now :/
oh we need to specify even lower, justasec
hrm, I think this was broken actually before #681 . it seems related to #680
I am reverting the prod version temporarily:
remote: GitHub found 4 vulnerabilities on pcottle/learnGitBranching's default branch (1 critical, 3 moderate). To find out more, visit:
remote: https://github.com/pcottle/learnGitBranching/network/alerts
remote:
To github.com:pcottle/learnGitBranching.git
+ 38c7320...ec6f612 gh-pages -> gh-pages (forced update)
wait, somehow this messed up the gh-pages hosting:
https://learngitbranching.js.org/?demo
🤦🏼♂️ so it it'll work in prod as we figure this out
oh somehow we dropped index.html, justasec
Gah, still broken. few notes for myself:
- the
.gitignoreis actually different depending on if we're on gh-pages or the master branch. this is a good thing to clean up eventually so we don't have issues like this (where we dropped the index and build assets on the gh-pages branch) - for some reason the build files werent resolving, so I had to inline their absolute URIs. but now they are getting blocked due to cross origin
I have a few meetings, will check in later
Alright! I reverted prod gh-pages back to a version that works, phew 🥵. Drag and drop in the rebase view should be fully functional.
@hong4rc I think the issue we need to resolve is that although we are "depending" on jquery 3.4.1 in yarn.lock before #680, we're actually running 1.8.0 in the browser. So when you made the changes to index.html and we started running on the correct version in our dependencies, the drag and drop functionality broke.
ideally I'd love to just upgrade the drag and drop functionality to a modern version rather than have this old dependency... anyways I have to get back to my real work for today, so I'll try looking at this later. for now, we can't really push prod against master :(
hrm I downgraded the version but I'm still getting errors now :/
Can you give me reproduce this error?
I think the problem is jquery-ui. I use jquery-ui 1.12 for jquery 3.5 => don't see error about find(...).andSelf (not sure other errors)
I try use
require('jquery-ui/ui/widget');
require('jquery-ui/ui/widgets/mouse');
require('jquery-ui/ui/plugin');
require('jquery-ui/ui/widgets/draggable');
require('jquery-ui/ui/widgets/sortable');
We can build it to lib file to avoid rebuild lib(without change)
ah yeah, I found this example as well: https://bugs.jqueryui.com/ticket/15020
I think thats what was confusing me -- we have to explicitly require it in rebase view to make it work now :P
derp, I merged the wrong PR >___< justasec
Ok everyone! After a hard refresh, the latest version of prod has this all working: https://learngitbranching.js.org/?NODEMO&command=gc;gc;gc;git%20rebase%20-i%20HEAD~3
Let me know if you spot any other issues but we should be all fixed up here 😇security vulnerabilities fixed AND jquery UI integrated in a more modern way in our build infra
ah yeah, I found this example as well: https://bugs.jqueryui.com/ticket/15020
I think thats what was confusing me -- we have to explicitly require it in rebase view to make it work now :P
You forgot draggable
Open https://learngitbranching.js.org/ and click next until type any command :)

We need to add this:
require('jquery-ui/ui/plugin');
require('jquery-ui/ui/safe-active-element');
require('jquery-ui/ui/safe-blur');
require('jquery-ui/ui/widgets/draggable');
I can't test now, so can you help me test it?
Thanks
Ah my bad! Let me try to update