utubo / firefox-simple_gesture

🦊An add-on that adds simple touch gestures for Firfox for Android. Sorry, I only check issues sometimes.
https://addons.mozilla.org/ja/firefox/addon/simple-gesture/
Other
32 stars 1 forks source link

「次のタブ」「前のタブ」が動かない場合がある #9

Closed utubo closed 6 years ago

utubo commented 6 years ago

tab.indexが連番じゃない可能性

utubo commented 6 years ago

nextTab = tabs.filter(t => t.index >= currentTab.index).sort((a,b) => a.index - b.index)[0] prevTab = tabs.filter(t => t.index <= currentTab.index).sort((a,b) => b.index - a.index)[0] みたいにすればindexが飛び飛びでも取得できるけどソースが解りづらいし きっと少し遅い