Open shef-ski opened 2 weeks ago
Hi @shef-ski ! Thank you! I have checked this on my iPhone, and I cannot reproduce the bug, probably being platform specific. If everything works correctly, there should be a "drag handle" for each tab (see the red circle in the screenshot below). Only when you drag the handle will trigger the tab sorting. If you scroll other part of the UI, when you release your finger, Vertical Tabs will check how far you moved. If distance > 10, it will trigger the scrolling but will not open the tab; if distance <= 10, it will interpret the gesture as a "tap" and will open the tab.
Since I don't have an Android device, I cannot pinpoint the exact cause. Could you please help me if you have time? Feel free to open a PR if you can fix it. Thank you so much!
Hi, yes this is the behaviour I assumed but it does not work that way on my device. It seems to always open the tab no matter the scrolling distance.
I will wait if others report the same issue as well, there's a good chance it is specific to my model/generation. I will be getting a new phone (Google Pixel) in a couple of weeks anyways and update you if it persists.
Thank you @shef-ski ! This is more likely to be platform specific, rather than model specific. Android and iOS use different web engines, the exact behavior of touch events might be a little bit different. Most likely some events are not correctly fired. If possible, could you please try to use USB cable to connect your Android phone to a computer with Chrome installed? I'm not familiar with Android dev. If I'm correct, you can enable remote debug in Chrome to test if the events are fired as expected. (Don't worry if you are inconvenient. These are optional. Maybe someone can help me out.)
Hi, currently do not have the time and knowledge to do this but it's a goal of mine to be able to help out with minor things like this sometime in the future. I just need to find time to pick up on JavaScript and Obsidian plugin dev before.
Either way, please take your time because I can imagine it's a ton of work to develop and maintain a powerful plugin like this alone :)
On my mobile version, whenever I try to scroll through my vertical tabs by touching and swiping on a note tab, the tab opens immediately and interrupts the scrolling process. This happens regardless of how briefly I touch the tab, making navigation difficult. A current workaround is to scroll using the very edge of the vertical tabs area, but this region is quite narrow.
I am using a Samsung Galaxy S21.
If you cannot reproduce it and/or do not have the time, I could attempt to fix the issue myself and create a PR. I believe the issue resides with this part of the code within the Tabs.tsx, but I'm not certain:
const { listeners } = useTouchSensor({ minDistance: 10, callback: (moved) => { if (!moved) openTab(); }, });