Thread

Zero-JS Hypermedia Browser

Relays: 5
Replies: 1
Generated: 07:55:22
Almost have tabs working in my notes app. I want them to behave similarly to #Chrome. When moving a tab, it follows the cursor - my app should work the same. I do already have the following-cursor animation working, but reorganizing tabs don’t exactly work yet. Kinda works, but not entirely. Lemme explain what’s wrong: If I have 3 tabs (tab 1 being left-most and tab 3 being right-most) and I try moving tab 1 to tab 2’s position. Tab 1 follows the cursor and you visibly see tab 2 moving to tab 1’s position with a nice smooth animation - however, this is where the problem begins! Now, I release tab 1, so you would expect it to become tab no. 2. But no… it goes right back to its original position which was being the 1st tab 😩 **The bug:** Right now, to change the tab positions, you must release the tab on top of the tab NEXT to the tab you wish to change with. For example, if switching tab 1 and 2, you must drag tab 1 on top of tab 3. Unless it’s the last tab, then you can just move it to the right position of the last tab, and they will change position correctly. **The fix:** I need to calculate the center point of each tab. If on the left side, change to left position. If on the right side, change to the right side. Pretty obvious, and should be fairly straightforward. #Swift #AppKit #macOS
2025-10-02 19:38:05 from 1 relay(s) 1 replies ↓
Login to reply

Replies (1)