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

Reordering notes in custom sort doesn't work #11226

Open
annoyedhumanoid opened this issue Oct 17, 2024 · 2 comments · May be fixed by #11243
Open

Reordering notes in custom sort doesn't work #11226

annoyedhumanoid opened this issue Oct 17, 2024 · 2 comments · May be fixed by #11243
Labels
bug It's a bug desktop All desktop platforms high High priority issues

Comments

@annoyedhumanoid
Copy link

Operating system

macOS

Joplin version

3.0.15

Desktop version info

Joplin 3.0.15 (prod, darwin)

Client ID: 11cb0a2d420047cd9119a44d443e827c
Sync Version: 3
Profile Version: 47
Keychain Supported: Yes

Revision: 598677b

Backup: 1.4.1

Current behaviour

  1. Create a notebook with several notes
  2. Toggle sort order field to custom
  3. Drag a note up or down in the note list sidebar to move it
  4. It jumps to the top and can only be moved between other notes that have jumped to the top
moving.notes.demo.mov

Expected behaviour

The dragged notes should move to the position hinted by the horizontal line between notes, rather than sticking to the top.

Logs

The only message in the console associated with moving a note is the following:

App: node:internal/process/task_queues:95
Refreshing notes: 2 5ae3997be9a94aeab4f21e069fd97d01
@annoyedhumanoid annoyedhumanoid added the bug It's a bug label Oct 17, 2024
@personalizedrefrigerator
Copy link
Collaborator

I can reproduce this on Linux with v3.1.18 and v3.0.15. For me, alt+arrow keys seem to correctly re-order notebooks, but clicking and dragging fails.

@personalizedrefrigerator personalizedrefrigerator added desktop All desktop platforms high High priority issues labels Oct 19, 2024
MarquisMc added a commit to MarquisMc/joplin that referenced this issue Oct 22, 2024
Fixes laurent22#11226

Update the `onDrop` function in `useDragAndDrop.ts` to correctly update note positions in the list.

* Add a check to prevent dropping notes outside the valid range
* Call `Note.insertNotesAt` with the correct parameters

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/laurent22/joplin/issues/11226?shareId=XXXX-XXXX-XXXX-XXXX).
@MarquisMc MarquisMc linked a pull request Oct 22, 2024 that will close this issue
@Nirvanjha2004
Copy link

DragandDrop.mp4

In Windows its working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug desktop All desktop platforms high High priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants